diff options
| author | mra (Open ERP) <mra@tinyerp.com> | 2010-02-04 18:36:43 +0530 |
|---|---|---|
| committer | mra (Open ERP) <mra@tinyerp.com> | 2010-02-04 18:36:43 +0530 |
| commit | 42b2e2deef2d64eba197de9f570895126aff4a0f (patch) | |
| tree | cac4dba02b33416136225f51a1a83bf917971ae8 /bin/addons/base | |
| parent | 71e278598b3843efcc002e45fdcc93a7e2e9c3b1 (diff) | |
[FIX] Load translation with invalid lang code
bzr revid: mra@tinyerp.com-20100204130643-wr7a9xnj7n3ixw3n
Diffstat (limited to 'bin/addons/base')
| -rw-r--r-- | bin/addons/base/module/module.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index f06f6fcc24e..769ef4687e8 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -474,6 +474,8 @@ class module(osv.osv): # unable to find the module. we skip continue for lang in filter_lang: + if len(lang) > 5: + raise osv.except_osv(_('Error'), _('You Can Not Load Translation For language Due To Invalid Language/Country Code')) iso_lang = tools.get_iso_codes(lang) f = os.path.join(modpath, 'i18n', iso_lang + '.po') if not os.path.exists(f) and iso_lang.find('_') != -1: |
