[QGIS Commit] r8497 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri May 23 11:27:50 EDT 2008
Author: ersts
Date: 2008-05-23 11:27:49 -0400 (Fri, 23 May 2008)
New Revision: 8497
Modified:
trunk/qgis/src/app/main.cpp
Log:
-update locale/userLocal when default locale is use as well as when --lang= option is used so that thirdparty plugins can be in the same language as the rest of QGIS
Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp 2008-05-23 15:12:53 UTC (rev 8496)
+++ trunk/qgis/src/app/main.cpp 2008-05-23 15:27:49 UTC (rev 8497)
@@ -431,7 +431,6 @@
/* Translation file for QGIS.
*/
QSettings mySettings;
- QString mySystemLocale = QLocale::languageToString(QLocale::system().language());
QString myUserLocale = mySettings.value("locale/userLocale", "").toString();
bool myLocaleOverrideFlag = mySettings.value("locale/overrideFlag",false).toBool();
QString myLocale;
@@ -453,6 +452,9 @@
if (!myLocaleOverrideFlag || myUserLocale.isEmpty())
{
myTranslationCode = QLocale::system().name();
+ //setting the locale/userLocale when the --lang= option is not set will allow third party
+ //plugins to always use the same locale as the QGIS, otherwise they can be out of sync
+ mySettings.setValue("locale/userLocale", myTranslationCode);
}
else
{
More information about the QGIS-commit
mailing list