[Erp5-report] r7251 - /erp5/trunk/products/ERP5Type/patches/Localizer.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 12 17:48:09 CEST 2006
Author: jerome
Date: Fri May 12 17:48:05 2006
New Revision: 7251
URL: http://svn.erp5.org?rev=7251&view=rev
Log:
No need to coerce string types if mapping is empty
Modified:
erp5/trunk/products/ERP5Type/patches/Localizer.py
Modified: erp5/trunk/products/ERP5Type/patches/Localizer.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/Localizer.py?rev=7251&r1=7250&r2=7251&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/Localizer.py (original)
+++ erp5/trunk/products/ERP5Type/patches/Localizer.py Fri May 12 17:48:05 2006
@@ -63,7 +63,7 @@
translated_str = catalog_obj.gettext(msgid, **params)
# Map the translated string with given parameters
- if type(mapping) is type({}):
+ if type(mapping) is type({}) and len(mapping):
unicode_mapping = {}
if not isinstance(translated_str, unicode):
translated_str = translated_str.decode('utf8')
More information about the Erp5-report
mailing list