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 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""Add a New Test language."""\n
<value> <string>portal = context.getPortalObject()\n
Localizer = portal.Localizer\n
\n
context.getPortalObject().Localizer.manage_addLanguage(\'wo\')\n
context.getPortalObject().Localizer.manage_addLanguage(\'xh\')\n
context.getPortalObject().Localizer.erp5_ui.manage_addLanguage(\'wo\')\n
context.getPortalObject().Localizer.erp5_ui.manage_addLanguage(\'xh\')\n
context.getPortalObject().portal_caches.clearAllCache()\n
\n
for language in (\'wo\', \'xh\'):\n
Localizer.manage_addLanguage(language)\n
for catalog in Localizer.objectValues():\n
catalog.manage_addLanguage(language)\n
\n
portal.portal_caches.clearAllCache()\n
return \'New Languages Added.\'\n
</string> </value>
</item>
......@@ -101,6 +101,11 @@ return \'New Languages Added.\'\n
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>Localizer</string>
<string>_getiter_</string>
<string>language</string>
<string>catalog</string>
</tuple>
</value>
</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