qBittorrent
qBittorrent copied to clipboard
Qtbase translations are not loaded in `zh_CN`
qBittorrent & operating system versions
qBittorrent: 4.4.3.1 x64 Operating System: Windows 11 Pro 22H2 & macOS 12.5 Qt: 6.3.0
What is the problem?
Qtbase translations are not loaded.
The OK, Cancel, Apply buttons, and the context menu in the options dialog remain in English, although the locale is set to another language.
This seem to occur on any language, and no matter if the user has a Qt installation in PATH or not.
Steps to reproduce
- Run qBittorrent
- Set the app locale to a language other than English
- Restart the app and observe the buttons and context menu in options dialog, or the main dialog.
Additional context
Log(s) & preferences file(s)
No response
Update: This issue only occurs on locales that are region-specific, specifically, zh_CN.
zh_CN is stored as zh in qBittorent's settings, thus can't be paired with qtbase_zh_CN.qm.
Renaming the locale zh to zh_CN should solve the issue.
QTranslator::load() automatically looks for qbittorent_zh.qm if qbittorent_zh_CN.qm is not found,
but it doesn't look for qtbase_zh_CN.qm if qtbase_zh.qm is not found.
Thus renaming the locale does not affect loading the main translation file.