Commit c0083abe authored by Kevin Deldycke's avatar Kevin Deldycke

Make the Aurelien's patch more flexible


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5401 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99154feb
......@@ -49,8 +49,6 @@ class LocalizerTranslationService:
message_catalog_aliases = { "Default": "default"
, "ui" : "erp5_ui"
, "content": "erp5_content"
, "erp5_ui": "erp5_ui"
, "erp5_content": "erp5_content"
}
# Be carefull to not import Localizer anywhere in that Localizer patch:
......@@ -75,11 +73,10 @@ class LocalizerTranslationService:
raise LocalizerPatchError, "Localizer tool not found."
# Get the Localizer catalog id
catalog_id = message_catalog_aliases.get(domain, 'default')
catalog_id = message_catalog_aliases.get(domain, domain)
if catalog_id not in localizer.objectIds():
# No catalog found: return the untranslated string
return msgid
# No catalog found: use the default one
catalog_id = 'default'
catalog_obj = localizer[catalog_id]
# Adapt Translation Service default value to the Localizer one
......
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