Commit c646e1af authored by Aurel's avatar Aurel

allow to defined message translation like 'lang | catalog' to export

other catalog that ui


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10809 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8d8d3f68
...@@ -3458,10 +3458,12 @@ class MessageTranslationTemplateItem(BaseTemplateItem): ...@@ -3458,10 +3458,12 @@ class MessageTranslationTemplateItem(BaseTemplateItem):
def build(self, context, **kw): def build(self, context, **kw):
localizer = context.getPortalObject().Localizer localizer = context.getPortalObject().Localizer
for lang in self._archive.keys(): for lang_key in self._archive.keys():
# Export only erp5_ui at the moment. if '|' in lang_key:
# This is safer against information leak. lang, catalog = lang_key.split(' | ')
for catalog in ('erp5_ui', ): else: # XXX backward compatibilty
lang = lang_key
catalog = 'erp5_ui'
path = os.path.join(lang, catalog) path = os.path.join(lang, catalog)
mc = localizer._getOb(catalog) mc = localizer._getOb(catalog)
self._objects[path] = mc.manage_export(lang) self._objects[path] = mc.manage_export(lang)
......
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