diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-03-21 15:04:54 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-03-29 14:48:57 +0000 |
| commit | 257ccdf83ca0e187d9bbe23617018cc6b171dc7a (patch) | |
| tree | 2a655e1cb797ab74d4d9bb3d22735a4d3fe8bbd3 /addons/note/data | |
| parent | 76264db40b177df5ec8f8675bae5c9ee349e0478 (diff) | |
[FIX] tools: extract module from po file
When a single po file is processed (i.e. direct po import, not read from a i18n
directory inside a module), there was no module information on code translations
The module information is important for web translations where the list of
modules is given in the call to the route '/website/translations' and
'/web/webclient/translations' and only the web translations of these specific
modules is retrieved and used.
To manually import the translations of a custom module (e.g. openerp_enterprise),
the base.language.import wizard is typically used and the give .po file is
directly imported.
For model and model_terms, the module information is easily deducted from the
the record external id (<module>.<reference>) but for code translation, we
relied on the global variable module_name.
The .po file do contain the module information but this information was ignored.
Real example:
#. module: openerp_enterprise
#. openerp-web
#: code:addons/openerp_enterprise/static/src/js/odoo_enterprise_start_trial.js:249
#, python-format
msgid "Please choose your domain name"
msgstr "Veuillez choisir votre nom de domaine"
Before this commit, the above translation was imported without the module and
was not retrieved in the '/website/translations' call on the /trial page
The global module_name is still used when set for backward compatibility.
Co-authored-by: Raphael Collet <rco@odoo.com>
Diffstat (limited to 'addons/note/data')
0 files changed, 0 insertions, 0 deletions
