[Erp5-report] r10809 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 18 15:20:15 CEST 2006
Author: aurel
Date: Wed Oct 18 15:20:08 2006
New Revision: 10809
URL: http://svn.erp5.org?rev=10809&view=rev
Log:
allow to defined message translation like 'lang | catalog' to export
other catalog that ui
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=10809&r1=10808&r2=10809&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Wed Oct 18 15:20:08 2006
@@ -583,7 +583,7 @@
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 @@
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 = {}
More information about the Erp5-report
mailing list