[PC-BSD Commits] r4775 - pcbsd/trunk/SoftwareManager

svn at pcbsd.org svn at pcbsd.org
Mon Oct 26 09:38:25 PST 2009


Author: kris
Date: 2009-10-26 10:38:25 -0700 (Mon, 26 Oct 2009)
New Revision: 4775

Modified:
   pcbsd/trunk/SoftwareManager/SoftwareManager.pro
   pcbsd/trunk/SoftwareManager/main.cpp
Log:

Added i18n generation to SoftwareManager



Modified: pcbsd/trunk/SoftwareManager/SoftwareManager.pro
===================================================================
--- pcbsd/trunk/SoftwareManager/SoftwareManager.pro	2009-10-26 17:35:44 UTC (rev 4774)
+++ pcbsd/trunk/SoftwareManager/SoftwareManager.pro	2009-10-26 17:38:25 UTC (rev 4775)
@@ -82,6 +82,11 @@
 		i18n/SoftwareManager_zh_TW.ts \
 		i18n/SoftwareManager_zu.ts
 
+dotrans.path=/usr/local/kde4/share/apps/pcbsd/i18n/
+dotrans.extra=cd i18n && lrelease-qt4 *.ts && cp *.qm /usr/local/kde4/share/apps/pcbsd/i18n/
+
+INSTALLS += dotrans
+
 QT +=  webkit
 
 INCLUDEPATH     += /usr/PCBSD/includes /usr/local/kde4/include

Modified: pcbsd/trunk/SoftwareManager/main.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/main.cpp	2009-10-26 17:35:44 UTC (rev 4774)
+++ pcbsd/trunk/SoftwareManager/main.cpp	2009-10-26 17:38:25 UTC (rev 4775)
@@ -28,10 +28,10 @@
     KApplication a;
 
 
-    QTranslator translator( 0 );
-    QLocale mylocale;
-    translator.load( QString("SoftwareManager_") + QLocale::languageToString(mylocale.language()), "." );
-    a.installTranslator( &translator );
+    QString locale = KGlobal::locale()->language();
+    QTranslator translator;
+    translator.load(QString("SoftwareManager_") + locale, "/usr/local/kde4/share/apps/pcbsd/i18n/");
+    a.installTranslator(&translator);
 
     PBM w; 
 	



More information about the Commits mailing list