Refactor transcript: don't use `translation-names-references.fods` references, but use now Po files.
The goal is to replace translation-names-references.fods
, the big un-versionable table and split it into something else, easier to maintain and that produce less merge conflicts.
For that, I choosed Po files. They have the advantages:
- Storing the reference (aka the keyword in English).
- Storing the translated string.
- UTF-8 and support RTL/LTR.
- They also allows to store comments (something JSON or CSV couldn't handle).
- They can be edited directly with Gitlab editor, or be used with many Po Editor available.
- Updating a Po file in a MR is unlikely to conflict with other languages, it's decentralised compare to
translation-names-references.fods
. - Translators can plug their own comments.
- It's easy to add a new item to the catalog (aka, adding a new character on a episode).
- Po also has many CLI tools available and libs for later manipulation/export.
The only regression I see: the big overview of all language proposed by translation-names-references.fods
will disapear. Each file will focus more on a single language. (note it might be still possible to make a Python script to generate a HTML table with all Po translations and upload it to peppercarrot.com, in case this overview is super important).
On the technical side, thanks to the PO parser library polib.py; it was possible to refactor the previous method. A complex parsing of the XML columns and raw, an impressive piece of code to read the complex XML storage of the fods libreoffice big table...
This MR also contains the export of all column into Po files, a very long task with many manual copy paste and check. A _catalog.pot was created with all entries commented, so it is easier now to guess what names is related to what definition.