recognise some locale "aliases" (e.g. zh_Hant and zh_TW)
Should fix fdroid-website#659 (closed).
-
Doesn't handle
zh_HK
atm; not entirely sure what the website is trying to do with that tbh. -
Not sure how to handle e.g. just
zh
(but the website only useszh_Hans
andzh_Hant
). -
Related: algorithm doesn't handle e.g.
de
; should this prefer e.g.de_DE
orde_AT
? It currently returns whatever comes first in the JSON AFAIK. -
Hasn't been tested on an actual build of the website since I don't have a suitable build env any more (but I did add a unit test).
-
Is there a more suitable term than "aliases"?