Commit ad8ab2f0 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Translate panel contextual menu

parent eaf307c5
......@@ -60,19 +60,19 @@
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-eye" data-i18n="Views">Views</dt>
{{#each view_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
<a class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-random" data-i18n="Workflows">Workflows</dt>
{{#each workflow_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
<a class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs" data-i18n="Actions">Actions</dt>
{{#each action_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
<a class="ui-body-inherit {{class_name}}" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
</script>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.39086.65235.37700</string> </value>
<value> <string>965.45005.21388.22067</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1519039107.29</float>
<float>1523892174.29</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -292,11 +292,14 @@
href: result_list[i + workflow_list.length + view_list.length]
});
}
gadget.element.querySelector("dl").innerHTML = panel_template_body_desktop({
return gadget.translateHtml(panel_template_body_desktop({
workflow_list: result_workflow_list,
view_list: result_view_list,
action_list: result_action_list
});
}));
})
.push(function (translated_html) {
gadget.element.querySelector("dl").innerHTML = translated_html;
});
}
}
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.59353.60904.62617</string> </value>
<value> <string>966.58910.9997.17254</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1520010851.84</float>
<float>1523892386.86</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -28,58 +28,97 @@
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Home"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Home"]</td>
<td>zhuye</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Modules"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Modules"]</td>
<td>mokuai</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Worklists"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Worklists"]</td>
<td>gongzhuoliebiao</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="History"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="History"]</td>
<td>lishi</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Search"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Search"]</td>
<td>soushuo</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Preferences"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Preferences"]</td>
<td>pianai</td>
</tr>
<tr>
<td>verifyText</td>
<td>//a[@data-i18n="Logout"]</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n="Logout"]</td>
<td>tuichu</td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope="erp5_checkbox"]//label</td>
<td>//div[@data-gadget-scope='panel']//div[@data-gadget-scope="erp5_checkbox"]//label</td>
<td>bianxue</td>
</tr>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/wo/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//dt[@data-i18n="Views"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='panel']//dt[@data-i18n="Views"]</td>
<td>shitu</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[text()="yanzhen"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -53,7 +53,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n='View'][contains(@class, 'active')]</td>
<td>//div[@data-gadget-scope='panel']//a[text()='View' and contains(@class, 'active')]</td>
<td></td>
</tr>
......@@ -61,13 +61,13 @@
<tr>
<td>verifyElementNotPresent</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n='View'][contains(@class, 'active')]</td>
<td>//div[@data-gadget-scope='panel']//a[text()='View' and contains(@class, 'active')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n='Relation Fields'][contains(@class, 'active')]</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Relation Fields' and contains(@class, 'active')]</td>
<td></td>
</tr>
......@@ -103,13 +103,13 @@
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n='Custom Dialog Action'][contains(@class, 'active')]</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Custom Dialog Action' and contains(@class, 'active')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//div[@data-gadget-scope='panel']//a[@data-i18n='Relation Fields'][contains(@class, 'active')]</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Relation Fields' and contains(@class, 'active')]</td>
<td></td>
</tr>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment