lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 413 forks source link

audit selectable languages against sdk types #3298

Closed tzarebczan closed 3 years ago

tzarebczan commented 4 years ago

Some languages, like jp, fail when trying to publish. The language must be in https://github.com/lbryio/types/blob/master/v2/proto/claim.proto#L115 and conform to ISO 639-1

jeffslofish commented 4 years ago

I'll take a look

jeffslofish commented 4 years ago

All 184 languages with a two letter code (as documented here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Table_of_all_possible_two_letter_codes) are accounted for in https://github.com/lbryio/types/blob/master/v2/proto/claim.proto#L115.

However, https://github.com/lbryio/lbry-desktop/blob/master/ui/constants/languages.js is missing two languages: ae and nb and has two extra languages which are deprecated: mo and sh.

The supported languages list (https://github.com/lbryio/lbry-desktop/blob/master/ui/constants/supported_languages.js) is much shorter and only includes 29 languages: cs,da,de,en,es,fr,gu,hi,hr,id,it,jv,kn,ml,mr,ms,nl,pa,pl,pt,ro,ru,sk,sr,sv,tr,uk,ur,zh.

Also, jp is not an officially assigned language code according to the ISO table. Do you mean ja (Japanese)?

tzarebczan commented 3 years ago

We now link these with the supported app languages. If a language is missing, it needs to have a translation added first.