Locales inconsistencies with Transifex
In jami-client-qt, we use QLocale::nativeLanguageName()
in UtilsAdapter::supportedLang()
(src/app/utilsadaptater.cpp
) that we select using the ISO 639-1 code that is used in the translations/jami_client_qt_ISO-639-1.ts
files.
This causes issues later on when we parse and select languages we show. That is because 1. ISO 639-1 codes have inconsistencies with nativeLangaugeName()
, 2. the way Transifex is programmed creates duplicates through the nativeLanguageName()
method and 3. this method doesn't even know the language because it is too obscure.
The way it is handled, currently, is simple: discard languages that have duplicate or unknown native language names in the eye of QT.
By changing quickly the code to print out the discarded languages, I noticed that thirty-six languages are ignored. This means 36 languages people could have worked on that gets thrown away and ignored.
Here is a list of all ignored languages:
Ignoring locale ace
Ignoring locale ar_EG because العربية exists
Ignoring locale az_IR
Ignoring locale be@tarask because беларуская exists
Ignoring locale be_BY because беларуская exists
Ignoring locale bg_BG because български exists
Ignoring locale cmn
Ignoring locale da_DK because dansk exists
Ignoring locale en_US because American English exists
Ignoring locale es_CO because español exists
Ignoring locale et_EE because eesti exists
Ignoring locale fa_IR because فارسی exists
Ignoring locale fr_BE because français exists
Ignoring locale fr_FR because français exists
Ignoring locale hak
Ignoring locale hi_IN because हिन्दी exists
Ignoring locale hr_HR because hrvatski exists
Ignoring locale it_IT because italiano exists
Ignoring locale ko_KR because 한국어 exists
Ignoring locale nl_NL because Nederlands exists
Ignoring locale oc
Ignoring locale pa_IN because ਪੰਜਾਬੀ exists
Ignoring locale pl_PL because polski exists
Ignoring locale pt_BR because português exists
Ignoring locale ro_RO because română exists
Ignoring locale ru_RU because русский exists
Ignoring locale sk_SK because slovenčina exists
Ignoring locale sr@Cyrl because српски exists
Ignoring locale sr@latin because српски exists
Ignoring locale sr_RS because српски exists
Ignoring locale th_TH because ไทย exists
Ignoring locale tr_TR because Türkçe exists
Ignoring locale uk_UA because українська exists
Ignoring locale zh_CN because 简体中文 exists
Ignoring locale zh_TW because 繁體中文 exists
Note that "Ignoring locale X" is point 3. and "Ignoring locale X because Y exists" is point 2.
I feel like accepting work from any languages in Transifex makes it that it's barely maintainable for both programmers that have to drop and not give any support whatsoever, and contributors that ends up making changes that aren't going to be included.
When I did talk about inconsistencies, for instance, "American English" is en
while "English" is en_IE
(Ireland English). That's one I noticed but there could be plenty other.
But this also causes inconsistencies in codes, while zh_CN
and zh_TW
are often used for simplified and traditional Chinese, they end up using zh
and zh_HK
, which isn't the norm and are just things QT set probably by default without thinking it through.
I would recommend to clean up Transifex with only necessary the languages (no need to differenciate English, English from Ireland, English from England, English from the US, English from Australia) and avoid using nativeLangaugeName()
, but rather add a translation string where people write the name of the language directly.