Commit 2ea447f8 authored by Vincent Pelletier's avatar Vincent Pelletier

Make Base_addUITestTranslation reusable.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 832a870a
......@@ -65,18 +65,18 @@
<td>New Languages Added</td>\n
<td></td>\n
</tr>\n
<tr>\n
\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/portal_skins/erp5_ui_test//Base_addUITestTranslation?message=Search Foos&translation_1=Seet Foos&translation_2=Searching Foos"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Translation of Search Foos updated</td>\n
<td></td>\n
</tr>\n
\n
<tal:block tal:repeat="param_dict python: [{\'translation\': \'Seet Foos\', \'language\': \'wo\'}, {\'translation\': \'Searching Foos\', \'language\': \'xh\'}]">\n
<tr tal:define="dummy python: param_dict.update({\'root\': here.portal_url()})">\n
<td>open</td>\n
<td tal:content="python: \'%(root)s/portal_skins/erp5_ui_test/Base_addUITestTranslation?message=Search Foos&translation=%(translation)s&language=%(language)s\' % param_dict"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Translation of Search Foos updated</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/portal_types/Foo%20Module/PortalType_deleteAction?id=search2&name=Search2&category=object_search&action=string:%24{object_url}/FooModule_viewSearchDialog">Create a second dummy search action to test the dynamic creation of select action drop-down list</td>\n
......
......@@ -53,14 +53,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""Add a New Test language."""\n
context.getPortalObject().Localizer.erp5_ui.gettext(\'Search Foos\')\n
\n
context.getPortalObject().Localizer.erp5_ui.message_edit(message=\'Search Foos\', language=\'wo\', translation=\'Seet Foos\',note=None)\n
context.getPortalObject().Localizer.erp5_ui.message_edit(message=\'Search Foos\', language=\'xh\', translation=\'Searching Foos\',note=None)\n
\n
original_message = "Search Foos"\n
return "Translation of %s updated" % (original_message, )\n
<value> <string>context.getPortalObject().Localizer.erp5_ui.gettext(message)\n
context.getPortalObject().Localizer.erp5_ui.message_edit(message=message, language=language, translation=translation, note=None)\n
return "Translation of %s updated" % (message, )\n
</string> </value>
</item>
<item>
......@@ -71,7 +66,7 @@ return "Translation of %s updated" % (original_message, )\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>message = "Search Foos",translation_1 =" Seet Foos",translation_2="Searching Foos"</string> </value>
<value> <string>message, translation, language</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -98,12 +93,11 @@ return "Translation of %s updated" % (original_message, )\n
<value>
<tuple>
<string>message</string>
<string>translation_1</string>
<string>translation_2</string>
<string>translation</string>
<string>language</string>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
<string>original_message</string>
</tuple>
</value>
</item>
......@@ -115,11 +109,7 @@ return "Translation of %s updated" % (original_message, )\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string>Search Foos</string>
<string> Seet Foos</string>
<string>Searching Foos</string>
</tuple>
<none/>
</value>
</item>
<item>
......
528
\ No newline at end of file
529
\ No newline at end of file
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