The export of add-on translations to PO files suffered from two
issues:
1. To find the best file candidate for each language, the exporter
compares ISO codes. One of the codes it tried to compare with is
the invalid `__POT__` (`settings.PARSER_TEMPLATE_ID`).
This would raise an assert in
`bl_i18n_utils.utils.locale_explode()` because its implementation
is different from the original `bpy_translations.locale_explode()`
when given invalid values.
This key is now filtered out to avoid the exception.
2. With "Update Existing" enabled, it tried to update the nonexistant
`trans.msgs` of the translations. The proper dictionary is
`trans.trans`.
Pull Request: https://projects.blender.org/blender/blender-addons/pulls/104942
The removal of the SVN repository and move to a simpler GIT one + usage
of weblate for actual translation efforts changes quite a lot of things.
Matches updates done to the i18n_utils py module in Blender sourcecode
itself.
This adds support for the basic update workflow.
Main TODOs:
* Investigate using weblate API to make admin tasks (repo updates)
easier and less risky.
* Make translating from Blender feature usable again (could also use
weblate API here actually).
Related to https://projects.blender.org/infrastructure/blender-projects-platform/issues/65
Python 3.4.0 deprecated the "imp" module, and replaced it with
"importlib". This changes imp.reload() into implib.reload().
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1016
* Update: update (or create) an addon's translation data (as some py code).
* Export PO: export an addon's translation data in a set of pot/po's files.
* Import PO: import a set of po's files to update an addon's translations.
Note: current i18n doc on wiki is completely outdated, I will try to fix this in following days.