Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311977 - dev-util/qt-creator-1.3.1 does not honor language setting
Summary: dev-util/qt-creator-1.3.1 does not honor language setting
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-29 18:35 UTC by Andrea
Modified: 2010-06-22 09:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea 2010-03-29 18:35:33 UTC
My gentoo box language LC is set to it_IT, but QtCreator start everytimes in english UI.
the useflag for languages is setted to "it" in make.conf.

I've made an "little hack" to set QtCreator Ui language in italian: I've copied in /usr/share/qtcreator/translations/ qtcreator_it.qm in qt_it.qm and then qtcreator restarted.
Now QtCreator is in italian; i think that this must to be adjust in qtcreator sources or in other mode.

Reproducible: Always

Steps to Reproduce:
1.copy /usr/share/qtcreator/translations/ qtcreator_it.qm in qt_it.qm
2.restart qtcreator


Actual Results:  
personal hack

Expected Results:  
fixing it on a new ebuild
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2010-03-30 13:43:31 UTC
I dont understand your hack. You mean that you renamed the qtcreator_it.qm -> qt_im.qm?

I 've looked the sources again and it seems that qt-creator is searching for qtcreator-${X}.qm files not qt_it.qm 
Comment 2 Andrea 2010-03-31 02:04:38 UTC
Yes, I have changed qtcreator_it.qm --> qt_it.qm and restarting QtCreator now is in italian language.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2010-04-01 16:45:12 UTC
Well I cant test it by my self. If this is the case then this bug should be reported upstream since they are compiling qtcreator_${X} translation files instead of qt_${x} 
Comment 4 Andrea 2010-04-02 02:44:40 UTC
maybe I've say bad: I've renamed qtcreator_it.qm --> qt_it.qm and then QtCreator now "speak" italian.
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2010-04-02 10:05:11 UTC
Well, let's have a look at the code!
(from app/main.cpp)

    QTranslator translator;
    QTranslator qtTranslator;
    QString locale = QLocale::system().name();
    const QString &creatorTrPath = QCoreApplication::applicationDirPath()
                        + QLatin1String(SHARE_PATH "/translations");
    if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
        const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
        const QString &qtTrFile = QLatin1String("qt_") + locale;
        // Binary installer puts Qt tr files into creatorTrPath
        if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) {
            app.installTranslator(&translator);
            app.installTranslator(&qtTranslator);
            app.setProperty("qtc_locale", locale);
        } else {
            translator.load(QString()); // unload()
        }
    }

The translators are installed only if both qtcreator_*.qm and qt_*.qm are successfully loaded. Since there's no qt_it.qm, no translation is loaded at all.
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2010-04-02 10:07:32 UTC
(In reply to comment #4)
> maybe I've say bad: I've renamed qtcreator_it.qm --> qt_it.qm and then
> QtCreator now "speak" italian.
> 

When you say "renamed" I guess you mean "copied", right? Or do you really mean "moved"?
Comment 7 Andrea 2010-04-02 13:10:30 UTC
> When you say "renamed" I guess you mean "copied", right? Or do you really mean
> "moved"?

Yes, is like you say: I copy the the original file to the other one. not move. only copy.

I tried now to delete qt_it.qm and QtCreator speak english. Re-coping the file qtcreator_it.qm --> qt_it.qm QtCreator return to Italian.

My locale says:
LANG=it_IT
LC_CTYPE="it_IT"
LC_NUMERIC="it_IT"
LC_TIME="it_IT"
LC_COLLATE="it_IT"
LC_MONETARY="it_IT"
LC_MESSAGES="it_IT"
LC_PAPER="it_IT"
LC_NAME="it_IT"
LC_ADDRESS="it_IT"
LC_TELEPHONE="it_IT"
LC_MEASUREMENT="it_IT"
LC_IDENTIFICATION="it_IT"
LC_ALL=it_IT

what wrongs?

Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2010-04-02 13:45:54 UTC
There's nothing wrong on your side, this is an upstream issue IMHO.
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2010-04-03 12:50:52 UTC
I guess I can fix it on our ebuild but this issue has to be reported upstream
Comment 10 Mike Limansky 2010-04-03 18:17:53 UTC
I've just checked all works fine for LINGUAS="ru", locale ru_RU.UTF-8. BTW I observed that all localization files was installed, regardless LINGUAS value:
ls -l /usr/share/qtcreator/translations/
итого 2768
-rw-r--r-- 1 root root 400676 Апр  3 21:53 qtcreator_de.qm
-rw-r--r-- 1 root root 268763 Апр  3 21:53 qtcreator_es.qm
-rw-r--r-- 1 root root 417870 Апр  3 21:53 qtcreator_fr.qm
-rw-r--r-- 1 root root 272734 Апр  3 21:53 qtcreator_it.qm
-rw-r--r-- 1 root root 333655 Апр  3 21:53 qtcreator_ja.qm
-rw-r--r-- 1 root root 367644 Апр  3 21:53 qtcreator_pl.qm
-rw-r--r-- 1 root root 396868 Апр  3 21:53 qtcreator_ru.qm
-rw-r--r-- 1 root root 362927 Апр  3 21:53 qtcreator_sl.qm
Comment 11 Andrea 2010-04-03 19:33:06 UTC
> regardless LINGUAS value:
> ls -l /usr/share/qtcreator/translations/
> итого 2768
> -rw-r--r-- 1 root root 400676 Апр  3 21:53 qtcreator_de.qm
> -rw-r--r-- 1 root root 268763 Апр  3 21:53 qtcreator_es.qm
> -rw-r--r-- 1 root root 417870 Апр  3 21:53 qtcreator_fr.qm
> -rw-r--r-- 1 root root 272734 Апр  3 21:53 qtcreator_it.qm
> -rw-r--r-- 1 root root 333655 Апр  3 21:53 qtcreator_ja.qm
> -rw-r--r-- 1 root root 367644 Апр  3 21:53 qtcreator_pl.qm
> -rw-r--r-- 1 root root 396868 Апр  3 21:53 qtcreator_ru.qm
> -rw-r--r-- 1 root root 362927 Апр  3 21:53 qtcreator_sl.qm
> 

same for me....but changing locale to LANG=it_IT-UTF-8 or LANG=it_IT@euro remain the same problem
Comment 12 Andrea 2010-04-18 12:40:28 UTC
no update about this problem?
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2010-04-18 14:55:52 UTC
(In reply to comment #12)
> no update about this problem?
> 

Since all the translation files are installed ( which is wront btw and I need to fix the ebuild ) I see no problem from our side. I suspect a Qt autodetection issue regarding your LINUGA. Could you please use LINGUAS="it_IT" without the -UTF-8 string and report back?
Comment 14 Andrea 2010-04-18 19:23:20 UTC
> Since all the translation files are installed ( which is wront btw and I need
> to fix the ebuild ) I see no problem from our side. I suspect a Qt
> autodetection issue regarding your LINUGA. Could you please use LINGUAS="it_IT"
> without the -UTF-8 string and report back?
> 

I started this bug having in LC and all only it_IT and after I try it_IT.utf-8 and it_IT@euro with no changes on qt-creator(having compiled it with it_IT setting). I don't think that I must recompile this packages with it_IT.utf-8
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2010-06-22 09:52:03 UTC
Please send this bug ustream

http://bugreports.qt.nokia.com/secure/Dashboard.jspa