[PC-BSD Commits] r4776 - pcbsd/trunk/SoundError

svn at pcbsd.org svn at pcbsd.org
Mon Oct 26 09:42:10 PST 2009


Author: kris
Date: 2009-10-26 10:42:10 -0700 (Mon, 26 Oct 2009)
New Revision: 4776

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

Updated SoundError to auto-gen i18n data



Modified: pcbsd/trunk/SoundError/SoundError.pro
===================================================================
--- pcbsd/trunk/SoundError/SoundError.pro	2009-10-26 17:38:25 UTC (rev 4775)
+++ pcbsd/trunk/SoundError/SoundError.pro	2009-10-26 17:42:10 UTC (rev 4776)
@@ -76,6 +76,11 @@
 		i18n/SoundError_zh_TW.ts \
 		i18n/SoundError_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
+
 INCLUDEPATH     += /usr/PCBSD/includes /usr/local/kde4/include
 
 QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib

Modified: pcbsd/trunk/SoundError/main.cpp
===================================================================
--- pcbsd/trunk/SoundError/main.cpp	2009-10-26 17:38:25 UTC (rev 4775)
+++ pcbsd/trunk/SoundError/main.cpp	2009-10-26 17:42:10 UTC (rev 4776)
@@ -29,12 +29,12 @@
 
     KApplication a;
 
- 
-    QTranslator translator( 0 );
-    QLocale uselocale;
-    translator.load( QString("SoundError_") + uselocale.name(), "/PCBSD/LANGS/" );
-    a.installTranslator( &translator );
+    QString locale = KGlobal::locale()->language();
+    QTranslator translator;
+    translator.load(QString("SoundError_") + locale, "/usr/local/kde4/share/apps/pcbsd/i18n/");
+    a.installTranslator(&translator);
 
+
     sndDialog w;
     w.programInit();
     a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );



More information about the Commits mailing list