r20672 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Mon Jan 11 21:30:10 UTC 2016
Author: craig
Date: Mon Jan 11 21:30:10 2016
New Revision: 20672
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20672
Log:
#13632: Revert 13386/r20436 to restore prefs as priority language setting over LC_ env vars
Modified:
trunk/Scribus/scribus/scribusapp.cpp
Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20672&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp (original)
+++ trunk/Scribus/scribus/scribusapp.cpp Mon Jan 11 21:30:10 2016
@@ -385,26 +385,7 @@
// read the locales
if (!lang.isEmpty())
- langs.push_back(lang);
-
- if (!(lang = ::getenv("LANG")).isEmpty())
- {
- if (lang=="C")
- lang="en";
- langs.push_back(lang);
- }
- if (!(lang = ::getenv("LC_MESSAGES")).isEmpty())
- {
- if (lang=="C")
- lang="en";
- langs.push_back(lang);
- }
- if (!(lang = ::getenv("LC_ALL")).isEmpty())
- {
- if (lang=="C")
- lang="en";
- langs.push_back(lang);
- }
+ langs.append(lang);
//add in user preferences lang, only overridden by lang command line option
QString Pff = QDir::toNativeSeparators(ScPaths::getApplicationDataDir());
@@ -428,11 +409,30 @@
{
QString prefslang = userprefsContext->get("gui_language","");
if (!prefslang.isEmpty())
- langs.push_back(prefslang);
+ langs.append(prefslang);
}
}
delete prefsFile;
}
+ }
+
+ if (!(lang = ::getenv("LANG")).isEmpty())
+ {
+ if (lang=="C")
+ lang="en";
+ langs.append(lang);
+ }
+ if (!(lang = ::getenv("LC_MESSAGES")).isEmpty())
+ {
+ if (lang=="C")
+ lang="en";
+ langs.append(lang);
+ }
+ if (!(lang = ::getenv("LC_ALL")).isEmpty())
+ {
+ if (lang=="C")
+ lang="en";
+ langs.append(lang);
}
#if defined(_WIN32)
@@ -451,12 +451,12 @@
lang = language;
if ( sublanguage != language && !sublanguage.isEmpty() )
lang += "_" + sublanguage.toUpper();
- langs.push_back(lang);
+ langs.append(lang);
}
}
#endif
- langs.push_back(QString(QLocale::system().name()));
+ langs.append(QString(QLocale::system().name()));
// remove duplicate entries...
QStringList::Iterator it = langs.end();
More information about the scribus-commit
mailing list