You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will remove elements from the back of the lang code. If a translation file is over-specified and user have a different territory code, it won't load.
For example:
If user has system locale ar_QA (Arabic - Qatar), then the QTranslator will try (ar_QA, ar). The ar_SA that we have will be ignored because it is over-specified (Just ar is good.).
The text was updated successfully, but these errors were encountered:
shenlebantongying
changed the title
Delete country code from translation files if there is no variant
Delete country code from translation files if there is no meaningful variant
Feb 3, 2025
shenlebantongying
changed the title
Delete country code from translation files if there is no meaningful variant
On macOS, QLocale will detect bcp47 -> lang-script-territory that causes interface to have inconsistent languages
Feb 3, 2025
shenlebantongying
changed the title
On macOS, QLocale will detect bcp47 -> lang-script-territory that causes interface to have inconsistent languages
On macOS, QLocale will detect bcp47 lang code format -> lang-script-territory that causes interface to have inconsistent languages
Feb 3, 2025
shenlebantongying
changed the title
On macOS, QLocale will detect bcp47 lang code format -> lang-script-territory that causes interface to have inconsistent languages
Translation not loaded because their name are over specified
Feb 3, 2025
Summary:
We should make translation filenames shorter but no shorter than necessary (and the format should follow bcp47)
ar_SA
->ar
).de_*
,es_*
...)zh_CN
tozh_Hans
andzh_TW
tozh_Hant
.The problem is that
QTranslator::load
's algorithm, https://doc.qt.io/qt-6/qtranslator.html#load-1.It will remove elements from the back of the lang code. If a translation file is over-specified and user have a different territory code, it won't load.
For example:
If user has system locale
ar_QA (Arabic - Qatar)
, then theQTranslator
will try(ar_QA, ar)
. Thear_SA
that we have will be ignored because it is over-specified (Justar
is good.).Sample other projects:
Related doc:
Previous issue
The text was updated successfully, but these errors were encountered: