diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-08-09 07:52:25 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-08-09 07:59:56 +0000 |
| commit | 98cc300cec732bced04bd5b4abbe9b87def10a91 (patch) | |
| tree | 21dc5860956a3f9f0ce52bd0af91008ed4d4dd0f /odoo/tools/translate.py | |
| parent | 8becb17b8a3aa18b92629c4ddd33630ea4b1444e (diff) | |
[IMP] tools: ignore line number for code translations
The line number was only indicative and was not used by the system.
When the translations source were updated, a big part of the diff was
only about the line numbers.
Ignore the given res_id value and export the line at 0
When reading the po file, the res_id from the file is still read and
stored in database but should be ignored
closes odoo/odoo#35582
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'odoo/tools/translate.py')
| -rw-r--r-- | odoo/tools/translate.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index 36a350ddaaf..37db19b2bdb 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -748,6 +748,7 @@ class PoFileWriter: for typy, name, res_id in tnrs: if typy == 'code': code = True + res_id = 0 if isinstance(res_id, int) or res_id.isdigit(): # second term of occurrence must be a digit # occurrence line at 0 are discarded when rendered to string |
