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
......@@ -583,7 +583,7 @@ class ObjectTemplateItem(BaseTemplateItem):
container_ids = container.objectIds()
subobjects_dict = {}
# Object already exists
if object_id in container_ids:
if object_id in container_ids:
old_obj = container._getOb(object_id)
if hasattr(aq_base(old_obj), 'groups'):
# we must keep original order groups
......@@ -3458,13 +3458,15 @@ class MessageTranslationTemplateItem(BaseTemplateItem):
def build(self, context, **kw):
localizer = context.getPortalObject().Localizer
for lang in self._archive.keys():
# Export only erp5_ui at the moment.
# This is safer against information leak.
for catalog in ('erp5_ui', ):
path = os.path.join(lang, catalog)
mc = localizer._getOb(catalog)
self._objects[path] = mc.manage_export(lang)
for lang_key in self._archive.keys():
if '|' in lang_key:
lang, catalog = lang_key.split(' | ')
else: # XXX backward compatibilty
lang = lang_key
catalog = 'erp5_ui'
path = os.path.join(lang, catalog)
mc = localizer._getOb(catalog)
self._objects[path] = mc.manage_export(lang)
def preinstall(self, context, installed_bt, **kw):
modified_object_list = {}
......
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