From: Kern Sibbald Date: Sat, 16 Feb 2008 17:23:10 +0000 (+0000) Subject: Add translation code to bat X-Git-Tag: Release-7.0.0~5009 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8e8cc7230301cc957a2222c0f68e120e4d373d02;p=bacula%2Fbacula Add translation code to bat git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6432 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index 139a33778b..8a2f01667d 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -36,6 +36,7 @@ #include +#include #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");