Commit ad8ab2f0 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Translate panel contextual menu

parent eaf307c5
...@@ -60,19 +60,19 @@ ...@@ -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> <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}} {{#each view_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview"> <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> </dd>
{{/each}} {{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-random" data-i18n="Workflows">Workflows</dt> <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}} {{#each workflow_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview"> <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> </dd>
{{/each}} {{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs" data-i18n="Actions">Actions</dt> <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}} {{#each action_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview"> <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> </dd>
{{/each}} {{/each}}
</script> </script>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.39086.65235.37700</string> </value> <value> <string>965.45005.21388.22067</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519039107.29</float> <float>1523892174.29</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -292,11 +292,14 @@ ...@@ -292,11 +292,14 @@
href: result_list[i + workflow_list.length + view_list.length] 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, workflow_list: result_workflow_list,
view_list: result_view_list, view_list: result_view_list,
action_list: result_action_list action_list: result_action_list
}); }));
})
.push(function (translated_html) {
gadget.element.querySelector("dl").innerHTML = translated_html;
}); });
} }
} }
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.59353.60904.62617</string> </value> <value> <string>966.58910.9997.17254</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1520010851.84</float> <float>1523892386.86</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -28,58 +28,97 @@ ...@@ -28,58 +28,97 @@
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Home"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Home"]</td>
<td>zhuye</td> <td>zhuye</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Modules"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Modules"]</td>
<td>mokuai</td> <td>mokuai</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Worklists"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Worklists"]</td>
<td>gongzhuoliebiao</td> <td>gongzhuoliebiao</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="History"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="History"]</td>
<td>lishi</td> <td>lishi</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Search"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Search"]</td>
<td>soushuo</td> <td>soushuo</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Preferences"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Preferences"]</td>
<td>pianai</td> <td>pianai</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//a[@data-i18n="Logout"]</td> <td>//div[@data-gadget-scope='panel']//a[@data-i18n="Logout"]</td>
<td>tuichu</td> <td>tuichu</td>
</tr> </tr>
<tr> <tr>
<td>verifyText</td> <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> <td>bianxue</td>
</tr> </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> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<tr> <tr>
<td>verifyElementPresent</td> <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> <td></td>
</tr> </tr>
...@@ -61,13 +61,13 @@ ...@@ -61,13 +61,13 @@
<tr> <tr>
<td>verifyElementNotPresent</td> <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> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <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> <td></td>
</tr> </tr>
...@@ -103,13 +103,13 @@ ...@@ -103,13 +103,13 @@
<tr> <tr>
<td>waitForElementPresent</td> <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> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementNotPresent</td> <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> <td></td>
</tr> </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