Commit 44054292 authored by Vincent Pelletier's avatar Vincent Pelletier

Create languages also in other catalogs.

Also, factorise code.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32805 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de27ed65
...@@ -53,15 +53,15 @@ ...@@ -53,15 +53,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Add a New Test language."""\n <value> <string>portal = context.getPortalObject()\n
Localizer = portal.Localizer\n
\n \n
context.getPortalObject().Localizer.manage_addLanguage(\'wo\')\n for language in (\'wo\', \'xh\'):\n
context.getPortalObject().Localizer.manage_addLanguage(\'xh\')\n Localizer.manage_addLanguage(language)\n
context.getPortalObject().Localizer.erp5_ui.manage_addLanguage(\'wo\')\n for catalog in Localizer.objectValues():\n
context.getPortalObject().Localizer.erp5_ui.manage_addLanguage(\'xh\')\n catalog.manage_addLanguage(language)\n
context.getPortalObject().portal_caches.clearAllCache()\n
\n
\n \n
portal.portal_caches.clearAllCache()\n
return \'New Languages Added.\'\n return \'New Languages Added.\'\n
</string> </value> </string> </value>
</item> </item>
...@@ -101,6 +101,11 @@ return \'New Languages Added.\'\n ...@@ -101,6 +101,11 @@ return \'New Languages Added.\'\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>Localizer</string>
<string>_getiter_</string>
<string>language</string>
<string>catalog</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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