]> git.sur5r.net Git - bacula/bacula/commitdiff
Add translation code to bat
authorKern Sibbald <kern@sibbald.com>
Sat, 16 Feb 2008 17:23:10 +0000 (17:23 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 16 Feb 2008 17:23:10 +0000 (17:23 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6432 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/main.cpp

index 139a33778bce139034dadc145dd5ed9cdcb3e180..8a2f01667d2732ab8f47786c9caf06249110676f 100644 (file)
@@ -36,6 +36,7 @@
 
 
 #include <QApplication>
+#include <QTranslator>
 #include "bat.h"
 
 MainWin *mainWin;
@@ -61,9 +62,18 @@ int main(int argc, char *argv[])
    app = new QApplication(argc, argv);        
    app->setQuitOnLastWindowClosed(true);
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+     
+   QTranslator qtTranslator;
+   qtTranslator.load(QString("qt_") + QLocale::system().name());
+   app->installTranslator(&qtTranslator);
 
+   QTranslator batTranslator;
+   batTranslator.load(QString("bat_") + QLocale::system().name());
+   app->installTranslator(&batTranslator);
 
-#ifdef ENABLE_NLS
+
+
+#ifdef xENABLE_NLS
    setlocale(LC_ALL, "");
    bindtextdomain("bacula", LOCALEDIR);
    textdomain("bacula");