Skip to content
Snippets Groups Projects
Commit c142f162 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] tools: reimport translations in csv


Before this commit trying to reimport csv of a translation failed.
The reason was that before 632fa044 the parsing was common
between po and csv while now it's split in two different parsers.
The res_id column of the CSV is the external id of the record and is
handled by IrTranslationImport.

Use DictReader instead of csv_reader to easily add new keys and still
be flexible on the given csv files.

Match the POReader format with a imd_model and imd_name column.

As for the PoFileReader, the code translations are unique and must be
discarded in case of duplicate.

Correct the error message if the imported file is not correct (was
missing an argument)

Fixes odoo/odoo#50975

closes odoo/odoo#51468

X-original-commit: 3cedadb5ba606e156f52e70ed08b25ac2df8d58b
Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent fa00ff97
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment