Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported locale "cmn" #11791

Closed
Holzhaus opened this issue Aug 5, 2023 · 3 comments · Fixed by #11793
Closed

Unsupported locale "cmn" #11791

Holzhaus opened this issue Aug 5, 2023 · 3 comments · Fixed by #11793

Comments

@Holzhaus
Copy link
Member

Holzhaus commented Aug 5, 2023

Bug Description

I see this in the terminal every time I start Mixxx:

warning [Main] Unsupported locale "cmn"

It looks like we use ISO 639-1 language codes (some with ISO 3166-1 alpha-2 country codes) in res/translations, except for cmn which is an ISO 639-3 language code for Mandarin Chinese. Not sure if this is redundant with zh/zh_CN/zh_HK/zh_TW which are all codes for Chinese (but may be another chinese dialect).

In any case, the error message indicates that the ISO 639-3 name might be incompatible with the way we handle locales at the moment (or the error message is wrong).

Version

4a51c39

OS

Arch Linux

@Holzhaus Holzhaus added the bug label Aug 5, 2023
@Holzhaus
Copy link
Member Author

Holzhaus commented Aug 6, 2023

Ok, I investigated a bit. Here's what the W3C says on the zh and cmn language tags:

Macrolanguages

The primary language subtags used with an extlang subtag are known as macrolanguages, and encompass a number of languages with more specific primary language subtags. The macrolanguage subtag can be used on its own, but unless there is some convention about its meaning in the context where it is used, it is not necessarily precise enough.

For example, zh means Chinese, but it covers many Chinese dialects, often mutually incomprehensible. When zh is used on its own, it is usually used to mean the predominant language in the encompassed range, although this is not explicitly specified in BCP 47. For example, conventionally zh is considered to represent the predominant, Mandarin form of Chinese. Where absolute clarity is needed you can use cmn instead as long as that doesn't break interoperability, however, if you are using zh to represent a language which is not Mandarin, such as Hakka Chinese, you are better off using the explicit code (in that case, hak).

Source: https://www.w3.org/International/articles/language-tags/ (emphasis mine)

We have both zh and cmn, and both have the same number of translated strings.

Screenshot from 2023-08-06 13-42-52

IIUC we can just delete cmn (both from our repo and in Transifex) because zh covers the same use case.

@daschuer
Copy link
Member

daschuer commented Aug 6, 2023

I think the issue is here simple.
QT uses ISO 639-1 where Chinese is zh:
https://www.localeplanet.com/icu/iso639.html

cmn is from the ISO 639-3

It is like de and deu

I will delete the language form Transifex as well.

@daschuer daschuer added this to the 2.4.0 milestone Aug 6, 2023
@daschuer
Copy link
Member

daschuer commented Aug 6, 2023

closed via #11793

@daschuer daschuer closed this as completed Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants