Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add normalize language function and tests (#41)
Fixes nvaccess/nvda#17527 Summary of the issue In the add-on store, sometimes translated add-ons appear as untranslated. This can be produced when an add-on has a locale folder with a non normalized language, like ES instead of es. In the transformation to build the views Branch using addon-datastore-transform repo, a function is used to get the available languages. Available languages are stored in a set. Moreover, when a folder is created to store json files for each available language, uppercase and lowercase folders with the same name aren't created. Consequently, if a non standard language is available, but in fact add-ons aren't translated to this language, the english translation can be copied in the folder corresponding to the standard language, even overriding the available language for the standard language. This can be observed for "es" (spanish). Development approach A function has been created to normalize language, and this is used in the function to get manifest localizations. Tests have been added just for this function.
- Loading branch information