Modified translations in a base_lang_code.po file are not updated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
New
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
Steps to reproduce the behaviour:
1) Create the i18n/base_
2) Update the module (importing the translation file).
3) Modify a translation already imported in the file i18n/base_
4) Update the module.
The original translation will not be updated.
server/
# Step 1: for sub-languages, load base language first (e.g. es_CL.po is loaded over es.po)
if base_lang_code:
if base_trans_file:
Note that context[
server/
self._overwrite = context.
server/
# Step 2: update existing (matching) translations
if self._overwrite:
SET value = ti.value,
state = 'translated'
FROM %s AS ti
WHERE %s AND ti.value IS NOT NULL AND ti.value != ''
""" % (self._
Here self._overwrite should be True in order to update existing translations.
TEMPORARY FIX
server/
-- self._overwrite = context.
++ self._overwrite = context.
Changed in openobject-server: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
description: | updated |
Thanks for the temporary fix.
This should probably be fixed by creating a context in the code that loads the modules, I'm guessing at the following line in loading.py:
modobj. update_ translations( cr, SUPERUSER_ID, [module_id], None) <-- add context= {'overwrite' : True} here
# Update translations for all installed languages