[RFC] Automatically update the list of supported locales #803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
#796 uses the list of locales included in the manifest.js file. Maintaining that list by hand is not an option, so we need a mechanism to do it automatically.
Solution
Add a update-manifest.py script that runs every time the PO files are imported from the agama-weblate repository.
xx.po
orxx_yy.po
(wherexx
is the language andyy
the territory). In the case ofxx.po
files, you cannot infer the territory from the name. For example,es.po
corresponds toes_es.po
, butuk.po
corresponds touk_ua
. That's why we have a map.manifest.json
file, including the locale code (en-us) and the name of the language (English). If there is more than one locale for the same language, it includes the territory in the name (e.g., English (United Kingdom) and English (Great Britain). Otherwise, it just uses the language name (English).Testing
To do