Open mgautierfr opened 11 months ago
This proposal, as formulated, contradicts the semantics of the language-self-name concept, which is an attribute of the concerned language only and is independent of the client. The right way to address that shortcoming with crh
is to add its self-name in the iso639_3
map in languageTools.cpp
.
By reading the intention behind this ticket I interpret it as a request to display in the current UI language those languages (coming from /catalog/v2/languages
) that don't have a registered self-name. I don't agree with the exception clause. IMHO, if we make that enhancement it may be useful to always display both the self-name of a language and its translation-in-the-current-UI-language (if the latter is available).
@mgautierfr @veloman-yunkan Can we now what the exact user visible problem this proposal adresses? Afaik the languages are always displayed in their own langauge and we know how to handle this in case ICU does not have the info!
Can we now what the exact user visible problem this proposal adresses?
In the case of crh
, as ICU doesn't have the information to display crh
in crh
, it display crh
in "the default language", so ("Crimean Tatar") for library.kiwix.org.
But if you are in a french UI, it would be better to display it in French ("tatar de Crimée")
We should display a lang in the following language (by preference order):
LANG
env var)Today we are displaying it in:
we know how to handle this in case ICU does not have the info!
Yes and we should still use it. But it need a explicit change in our code (and a release). By using UI language as first fallback, we somehow have a better UI "by default" until we add the info in our own code.
@mgautierfr Thanks, very clear to me now. I agree.
A locale may be known by ICU but without metadata about it (and so, no way to know how to name it in its own language).
Take for example
crh
which can be named in French or in English but we have no way to name things incrh
(nocrh.xml
in https://github.com/unicode-org/cldr/blob/main/common/main/)In this case,
locale.getDisplayLanguage(locale, langSelfNameICUString);
use the default/fallback language for the display name. It is English for library.kiwix.org but it can be changed withLANG
env var.In this case, we should fallback to the language of UI (specific to the user).