Quassel disregards LC_MESSAGES
Quassel on GNU/Linux should pick its interface language based on LC_ALL variable, then LC_MESSAGES, and then LANG. But Quassel doesn't use this convention and this is a bug. For, example, my system (Debian Squeeze 6.0.6 with Quassel 0.6.3) has the following output of "locale" command:
All programs but Quassel and QtCreator (QtCreator already fixed this bug in some future version) understand that I want English language to be my interface language. So, all programs speak with me in English. But Quassel speaks with me in Russian.
So, why there is such bug? I think there is the following reason: Qt docs recommend obtain current locale the following way: QLocale::system().name(). For example, you can see this here: http://qt-project.org/doc/qt-4.8/internationalization.html . But this is wrong. Because locale is very complex thing. Interface lang is one thing and numeric format is another thing.
So, how to fix this bug? I think you should do the following. Qt added new QTranslator method named uiLanguages. It returns recommended interface languages and it right understand LC_MESSAGES. So, this method.
Let quassel honour locale language settings
When the language setting (LC_MESSAGES) differs from the global locale
set, quassel will use the wrong language. Qt 4.8 introduces some changes
to QLocale which make this pretty much Just Work; this patch copies the
necessary bits for older Qts.
#1 Updated by Anonymous almost 9 years ago
Thanks for the elaborate report; some questions:
1. Is this all with the language setting set to '<System Default>'?
2. Does changing that value to English (or whatever you like) work (i.e. is this an issue only if you let quassel detect it automatically)?
3. Does the situation as per the ticket, or as per step 2, lead to a partially translated interface?
If it is what i think it is, it should be an easy fix (depending on how to deal with it for older versions of Qt).
#2 Updated by safinaskar almost 9 years ago
2. I just now tried to change this value to "English". Then I restarted Quassel. And I saw very strange confusing behavior: main window became English, but settings window became in a mix of this languages! Moreover, this settings window had caption in the mix!!! The caption says: "Configure Внешний вид"!!! (This means "Configure Interface".) Moreover, the setting window had two same items: "Внешний вид" (this means "Interface") and "Interface". And item "Interface" was empty. So, I attached screenshot with this very strange vehavior. Then I closed settings window and opened it again. All was normal, in English. Then I closed Quassel and runned it via "LC_ALL=C quassel". All was OK, again, in English. Thanks a lot for this question, you helped me to find another bug.
3. Per the ticket - no. Per step 2 - (as I said) yes.