[PC-BSD Commits] r5629 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Wed Dec 16 08:09:13 PST 2009


Author: kris
Date: 2009-12-16 08:09:13 -0800 (Wed, 16 Dec 2009)
New Revision: 5629

Modified:
   pcbsd/trunk/SysInstaller/main.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.cpp
Log:

Fixed bugs in the SysInstaller relating to i18n, now load translations properly, and allow choosing languages
after the first choice is made



Modified: pcbsd/trunk/SysInstaller/main.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/main.cpp	2009-12-16 15:08:02 UTC (rev 5628)
+++ pcbsd/trunk/SysInstaller/main.cpp	2009-12-16 16:09:13 UTC (rev 5629)
@@ -26,7 +26,7 @@
         appDir = QCoreApplication::applicationDirPath();
       }
 
-      QTranslator translator( 0 );
+      QTranslator translator;
       QLocale mylocale;
       QString langCode = mylocale.name();
 
@@ -35,6 +35,7 @@
 
       if ( QFile::exists(appDir + "/i18n/SysInstaller_" + langCode + ".qm" ) ) {
         translator.load( QString("SysInstaller_") + langCode, appDir + "/i18n/" );
+        a.installTranslator(&translator);
         qDebug() << "Loaded Translation:" << appDir + "/i18n/SysInstaller_" + langCode + ".qm";
       } else {
         langCode = "";

Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-12-16 15:08:02 UTC (rev 5628)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-12-16 16:09:13 UTC (rev 5629)
@@ -372,7 +372,6 @@
    for (int i=0; i < languages.count(); ++i) {
       if ( languages.at(i).indexOf("(" + code + ")" ) != -1 ) {
         comboLanguage->setCurrentIndex(i); 
-        return;
       }
    }
 



More information about the Commits mailing list