[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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user