Project

General

Profile

Bug #1194

Quassel disregards LC_MESSAGES

Added by safinaskar almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
General / Unspecified
Target version:
Start date:
11/22/2012
Due date:
% Done:

100%

Estimated time:
Version:
0.3.0.x
OS:
Linux

Description

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:

LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

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.

quassel.png (295 KB) quassel.png safinaskar, 11/23/2012 02:37 AM

Related issues

Related to Quassel IRC - Bug #1210: GUI have mixed localesResolved2013-04-01

Associated revisions

Revision 0392d7e7 (diff)
Added by Bas Pape over 5 years ago

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.

Fixes #1194

History

#1 Updated by Anonymous almost 6 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).
Thanks.

#2 Updated by safinaskar almost 6 years ago

1. Yes
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.

#3 Updated by Anonymous almost 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
  • Target version set to Some future release
  • Version changed from 0.6.2 to 0.8-pre

Fixed in MR 155

#4 Updated by Anonymous over 5 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

#5 Updated by Anonymous over 5 years ago

  • Target version changed from Some future release to 0.9.0
  • Version changed from 0.8-pre to 0.3.0.x

Also available in: Atom PDF