commit 22a9e27895e5b30d3f33f078c748003f4ee17e13
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Tue Mar 17 11:34:28 2015 +0100

    Fix setting Interlingua as GUI language
    
    The problem came from the fact that Qt associates Interlingua to locale C.
    Now, we do not rely anymore on the Qt locale to set the language. I suspect 
that the problem will still exist if the system locale is ia_IA.
    
    Fixes bug #9267.

diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index 3c509d2..fdd9745 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -185,16 +185,19 @@ frontend::Application * createApplication(int & argc, 
char * argv[])
 void setLocale()
 {
        QLocale theLocale;
+       string code;
        if (lyxrc.gui_language == "auto") {
                theLocale = QLocale::system();
+               code = fromqstr(theLocale.name());
+               // Qt tries to outsmart us and transforms en_US to C.
+               if (code == "C")
+                       code = "en_US";
        } else {
                Language const * l = languages.getLanguage(lyxrc.gui_language);
-               string const code = l ? l->code() : string();
+               code = l ? l->code() : string();
                theLocale = QLocale(toqstr(code));
        }
-       string const code = fromqstr(theLocale.name());
-       // Qt tries to outsmart us and transforms en_US to C.
-       Messages::guiLanguage((code == "C") ? "en_US" : code);
+       Messages::guiLanguage(code);
        QLocale::setDefault(theLocale);
        setlocale(LC_NUMERIC, "C");
 }
diff --git a/status.21x b/status.21x
index 1a44c61..9f851b8 100644
--- a/status.21x
+++ b/status.21x
@@ -147,6 +147,8 @@ What's new
   * LFUN_SPELLING_REMOVE
   (bug 9477).
 
+- Fix selection of Interlingua user interface (bug 9267).
+
 
 * INTERNALS
 

Reply via email to