From 7c5dce1072bbb0d24b08bbdc9852c30a06c930f0 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 27 Oct 2010 19:06:01 +0530 Subject: [PATCH] [FIX]: Fixed translation of warning messages lp bug: https://launchpad.net/bugs/660494 fixed bzr revid: rpa@tinyerp.com-20101027133601-caqy1wdk9pduxyem --- bin/addons/__init__.py | 4 +- bin/addons/base/i18n/base.pot | 50 +++++++++++++++++++ bin/addons/base/ir/ir_model.py | 2 +- bin/addons/base/ir/ir_values.py | 2 +- .../base/module/wizard/base_module_upgrade.py | 2 +- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 0b5c6dc09c5..5476dc198f3 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -30,7 +30,7 @@ import tools import tools.osutil from tools.safe_eval import safe_eval as eval import pooler - +from tools.translate import _ import netsvc @@ -806,7 +806,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): graph = create_graph(cr, ['base'], force) if not graph: logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module base cannot be loaded! (hint: verify addons-path)') - raise osv.osv.except_osv('Could not load base module', 'module base cannot be loaded! (hint: verify addons-path)') + raise osv.osv.except_osv(_('Could not load base module'), _('module base cannot be loaded! (hint: verify addons-path)')) has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report) if update_module: diff --git a/bin/addons/base/i18n/base.pot b/bin/addons/base/i18n/base.pot index 48ce827f149..51b5df3a8be 100644 --- a/bin/addons/base/i18n/base.pot +++ b/bin/addons/base/i18n/base.pot @@ -4303,6 +4303,7 @@ msgstr "" #: code:addons/base/res/res_config.py:0 #: code:addons/base/res/res_currency.py:0 #: code:addons/base/res/res_user.py:0 +#: code:addons/base/res/ir_property.py:) #, python-format msgid "Error" msgstr "" @@ -5754,6 +5755,7 @@ msgstr "" #. module: base #: code:addons/base/module/wizard/base_module_import.py:0 +#: code:addons/base/ir/ir_values.py: #, python-format msgid "Error !" msgstr "" @@ -8735,3 +8737,51 @@ msgstr "" msgid "Russian / русский язык" msgstr "" +#. module: base +#: code:addons/base/module/wizard/base_module_upgrade.py:0 +#, python-format +msgid "Unmet dependency !" +msgstr "" + +#. module: base +#: code:addons/base/module/wizard/base_module_upgrade.py:0 +#, python-format +msgid "Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages)" +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_model.py:0 +#, python-format +msgid "Invalid search criterions" +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_model.py:0 +#, python-format +msgid "The osv_memory field can only be compared with = and != operator." +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_values.py:0 +#, python-format +msgid "You do not have the permission to perform this operation !!!" +msgstr "" + +#. module: base +#: code:addons/base/res/ir_property.py:0 +#, python-format +msgid "Invalid type" +msgstr "" + +#. module: base +#: code:addons/__init__.py:0 +#, python-format +msgid "Could not load base module" +msgstr "" + +#. module: base +#: code:addons/__init__.py:0 +#, python-format +msgid "module base cannot be loaded! (hint: verify addons-path)" +msgstr "" + diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index 3f3700b0e45..86bb6cc4dc5 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -57,7 +57,7 @@ class ir_model(osv.osv): return [] field, operator, value = domain[0] if operator not in ['=', '!=']: - raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.') + raise osv.except_osv(_('Invalid search criterions'), _('The osv_memory field can only be compared with = and != operator.')) value = bool(value) if operator == '=' else not bool(value) all_model_ids = self.search(cr, uid, [], context=context) is_osv_mem = self._is_osv_memory(cr, uid, all_model_ids, 'osv_memory', arg=None, context=context) diff --git a/bin/addons/base/ir/ir_values.py b/bin/addons/base/ir/ir_values.py index f74ce746e12..a60fbdddb94 100644 --- a/bin/addons/base/ir/ir_values.py +++ b/bin/addons/base/ir/ir_values.py @@ -229,7 +229,7 @@ class ir_values(osv.osv): if not cnt: res2.remove(r) if r[1] == 'Menuitem' and not res2: - raise osv.except_osv('Error !','You do not have the permission to perform this operation !!!') + raise osv.except_osv(_('Error !'), _('You do not have the permission to perform this operation !!!')) return res2 ir_values() diff --git a/bin/addons/base/module/wizard/base_module_upgrade.py b/bin/addons/base/module/wizard/base_module_upgrade.py index 4db4028bdb0..b791aeea459 100644 --- a/bin/addons/base/module/wizard/base_module_upgrade.py +++ b/bin/addons/base/module/wizard/base_module_upgrade.py @@ -93,7 +93,7 @@ class base_module_upgrade(osv.osv_memory): if dep_mod.state in ('unknown','uninstalled'): unmet_packages.append(dep_mod.name) if len(unmet_packages): - raise osv.except_osv('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages)) + raise osv.except_osv(_('Unmet dependency !'), _('Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))) mod_obj.download(cr, uid, ids, context=context) cr.commit() _, pool = pooler.restart_pool(cr.dbname, update_module=True)