[PC-BSD Commits] r4778 - pcbsd/trunk/pcbsdusermanager

svn at pcbsd.org svn at pcbsd.org
Mon Oct 26 09:57:31 PST 2009


Author: kris
Date: 2009-10-26 10:57:31 -0700 (Mon, 26 Oct 2009)
New Revision: 4778

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

Updated pcbsdusermanager to auto-gen i18n properly



Modified: pcbsd/trunk/pcbsdusermanager/main.cpp
===================================================================
--- pcbsd/trunk/pcbsdusermanager/main.cpp	2009-10-26 17:43:55 UTC (rev 4777)
+++ pcbsd/trunk/pcbsdusermanager/main.cpp	2009-10-26 17:57:31 UTC (rev 4778)
@@ -27,11 +27,11 @@
 
     KApplication a;
 
+    QString locale = KGlobal::locale()->language();
+    QTranslator translator;
+    translator.load(QString("pcbsdusermanager_") + locale, "/usr/local/kde4/share/apps/pcbsd/i18n/");
+    a.installTranslator(&translator);
 
-    QTranslator translator( 0 );
-    QLocale mylocale;
-    translator.load( QString("pcUserManager_") + QLocale::languageToString(mylocale.language()), "." );
-    a.installTranslator( &translator );
 
     PCBSDUserManager w; 
 	

Modified: pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.pro
===================================================================
--- pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.pro	2009-10-26 17:43:55 UTC (rev 4777)
+++ pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.pro	2009-10-26 17:57:31 UTC (rev 4778)
@@ -101,8 +101,11 @@
 desktop.path=/usr/local/kde4/share/applications/kde4/
 desktop.files=pcusermanager.desktop
 
-INSTALLS += desktop
+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 += desktop dotrans
+
 QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib
 
 QT += qt3support



More information about the Commits mailing list