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

[BUG] Simplified Chinese setting failed. #555

Open
Genicur opened this issue Mar 12, 2025 · 5 comments · Fixed by #560
Open

[BUG] Simplified Chinese setting failed. #555

Genicur opened this issue Mar 12, 2025 · 5 comments · Fixed by #560
Labels
bug Something isn't working

Comments

@Genicur
Copy link

Genicur commented Mar 12, 2025

Describe the bug

Although the Simplified Chinese translation is shown as 100% on this webpage (https://explore.transifex.com/rare-1/rare/), the application does not display Simplified Chinese after switching to it in the settings and restarting. However, switching to Russian was successful.

Screenshots

Image

System information

Please complete the following information

  • Operating system: Windows 11 24H2
  • Version: 1.11.3.0
  • Installation method: msi

Error message

Rare_25-03-12--15-36.log

@Genicur Genicur added the bug Something isn't working label Mar 12, 2025
@loathingKernel
Copy link
Contributor

I have confirmed the issue, @Dummerle when you have some time, can you take a look at transifex? The placeholder.ts file hasn't been updated in a year in transifex.

@Dummerle
Copy link
Collaborator

I updated the translations in #559

@loathingKernel
Copy link
Contributor

loathingKernel commented Mar 13, 2025

The issue happens because Qt parses the zh-Hans suffix of our translation files to zh_CN QLocale.name(). That's why when Rare looks for the translation to load, it can't find the rare_zh_CN.qm file as it doesn't exist. This gets a bit complicated since Qt uses zh_CN suffix for its own base translations. The two seem to be identical as far as Qt is concerned.

In [19]: QLocale("zh_CN")
Out[19]: <PySide6.QtCore.QLocale(Chinese, Simplified Han, China) at 0x7ac9c053f140>

In [20]: QLocale("zh-Hans")
Out[20]: <PySide6.QtCore.QLocale(Chinese, Simplified Han, China) at 0x7ac9b93ec900>

I would like to avoid doing special handling, maybe we should move the zh-Hans translation in Transifex to the zh_CN translation. and use this suffix.

Edit: If I understand locales correctly, the issue stems from Hans being the script of the locale where we expect the country. The fully qualified name is zh-Hans-CN with zh-CN,zh as fallbacks/synonyms, so QTranslator gets confused because the suffix over-qualifies the script and under-qualifies the country code. Other translation files, such as rare_ca.qm or rare_de.qm which also miss the country code are found correctly by QTranslator.

@loathingKernel
Copy link
Contributor

Image

@loathingKernel
Copy link
Contributor

I think we should keep this issue open until we have fixed the issue in transifex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants