Commit f07d9747 authored by Kevin Deldycke's avatar Kevin Deldycke

By default, the default message is the message itself


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5322 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4619ad09
......@@ -12,6 +12,9 @@
#
##############################################################################
from Products.CMFCore.utils import getToolByName
# Template() is a new method of python 2.4, that's why we have the string.py
# file in ERP5Form.
try:
......@@ -35,7 +38,7 @@ class LocalizerTranslationService:
}
# Get Localizer
localizer = context.getPortalObject().Localizer
localizer = getToolByName(context, 'Localizer')
# Get the Localizer catalog id
catalog_id = None
if domain in message_catalog_aliases.keys():
......@@ -47,7 +50,8 @@ class LocalizerTranslationService:
return msgid
catalog_obj = localizer[catalog_id]
# Adapt Translation Service default value to the Localizer one
if default == None: default = []
if default == None:
default = msgid
# Call the Message Catalog gettext method
translated_str = catalog_obj.gettext( message = msgid
, lang = target_language
......
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