diff --git a/openerp/addons/__init__.py b/openerp/addons/__init__.py index af080724136..f91d66eb7a7 100644 --- a/openerp/addons/__init__.py +++ b/openerp/addons/__init__.py @@ -779,7 +779,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= modobj.write(cr, 1, [mid], {'state': 'installed', 'latest_version': ver}) cr.commit() # Update translations for all installed languages - modobj.update_translations(cr, 1, [mid], None) + modobj.update_translations(cr, 1, [mid], None, {'overwrite': tools.config['overwrite_existing_translations']}) cr.commit() package.state = 'installed' diff --git a/openerp/tools/config.py b/openerp/tools/config.py index 7d0b04739e4..7b0e560f4f6 100644 --- a/openerp/tools/config.py +++ b/openerp/tools/config.py @@ -217,7 +217,7 @@ class configmanager(object): group.add_option("--i18n-import", dest="translate_in", help="import a CSV or a PO file with translations and exit. The '-l' option is required.") group.add_option("--i18n-overwrite", dest="overwrite_existing_translations", action="store_true", default=False, - help="overwrites existing translation terms on importing a CSV or a PO file.") + help="overwrites existing translation terms on updating a module or importing a CSV or a PO file.") group.add_option("--modules", dest="translate_modules", help="specify modules to export. Use in combination with --i18n-export") group.add_option("--addons-path", dest="addons_path", @@ -264,8 +264,8 @@ class configmanager(object): die(opt.translate_in and (not opt.language or not opt.db_name), "the i18n-import option cannot be used without the language (-l) and the database (-d) options") - die(opt.overwrite_existing_translations and (not opt.translate_in), - "the i18n-overwrite option cannot be used without the i18n-import option") + die(opt.overwrite_existing_translations and not (opt.translate_in or opt.update), + "the i18n-overwrite option cannot be used without the i18n-import option or without the update option") die(opt.translate_out and (not opt.db_name), "the i18n-export option cannot be used without the database (-d) option")