diff options
Diffstat (limited to 'src/traylabelmgr.cpp')
-rw-r--r-- | src/traylabelmgr.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/traylabelmgr.cpp b/src/traylabelmgr.cpp index 3b63cfc..9bbf013 100644 --- a/src/traylabelmgr.cpp +++ b/src/traylabelmgr.cpp @@ -29,6 +29,8 @@ #include <qtextstream.h> #include <qfiledialog.h> +#include <klocale.h> + #include "trace.h" #include "traylabelmgr.h" #include "util.h" @@ -60,8 +62,8 @@ TrayLabelMgr::~TrayLabelMgr() void TrayLabelMgr::about(void) { - if (QMessageBox::information(NULL, tr("About KDocker"), - tr("Bugs/wishes to Girish Ramakrishnan ([email protected])\n" + if (QMessageBox::information(NULL, i18n("About KDocker"), + i18n("Bugs/wishes to Girish Ramakrishnan ([email protected])\n" "English translation by Girish ([email protected])\n\n" "http://kdocker.sourceforge.net for updates"), QString::null, SHOW_TRACE_TEXT) == 1) SHOW_TRACE(); @@ -89,8 +91,8 @@ void TrayLabelMgr::startup(void) return; } - if (QMessageBox::warning(NULL, tr("KDocker"), - tr(state == SysTrayAbsent ? "No system tray found" + if (QMessageBox::warning(NULL, i18n("KDocker"), + i18n(state == SysTrayAbsent ? "No system tray found" : "System tray appears to be hidden"), QMessageBox::Abort, QMessageBox::Ignore) == QMessageBox::Abort) { @@ -204,7 +206,7 @@ bool TrayLabelMgr::processCommand(int argc, char** argv) case '?': return false; case 'a': - qDebug(tr("Girish Ramakrishnan ([email protected])")); + qDebug(i18n("Girish Ramakrishnan ([email protected])").local8Bit()); return false; case 'b': check_normality = false; @@ -279,14 +281,14 @@ QTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) { if (w == None) { - qDebug(tr("Select the application/window to dock with button1.")); - qDebug(tr("Click any other button to abort\n")); + qDebug(i18n("Select the application/window to dock with button1.").local8Bit()); + qDebug(i18n("Click any other button to abort\n").local8Bit()); const char *err = NULL; if ((w = selectWindow(QPaintDevice::x11AppDisplay(), &err)) == None) { - if (err) QMessageBox::critical(NULL, tr("KDocker"), tr(err)); + if (err) QMessageBox::critical(NULL, i18n("KDocker"), i18n(err)); return NULL; } } @@ -297,8 +299,8 @@ QTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) * Abort should be the only option here really. "Ignore" is provided here * for the curious user who wants to screw himself very badly */ - if (QMessageBox::warning(NULL, tr("KDocker"), - tr("The window you are attempting to dock does not seem to be a" + if (QMessageBox::warning(NULL, i18n("KDocker"), + i18n("The window you are attempting to dock does not seem to be a" " normal window."), QMessageBox::Abort, QMessageBox::Ignore) == QMessageBox::Abort) return NULL; @@ -308,8 +310,8 @@ QTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) TRACE("0x%x is not docked", (unsigned) w); - QMessageBox::message(tr("KDocker"), - tr("This window is already docked.\n" + QMessageBox::message(i18n("KDocker"), + i18n("This window is already docked.\n" "Click on system tray icon to toggle docking.")); return NULL; } @@ -350,7 +352,7 @@ QTrayLabel *TrayLabelMgr::dockApplication(char *argv[]) if (execvp(argv[0], argv) == -1) { - qDebug(tr("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno))); + qDebug(i18n("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)).local8Bit()); ::exit(0); // will become a zombie in some systems :( return NULL; } @@ -359,7 +361,7 @@ QTrayLabel *TrayLabelMgr::dockApplication(char *argv[]) if (pid == -1) { QMessageBox::critical(NULL, "KDocker", - tr("Failed to fork: %1").arg(strerror(errno))); + i18n("Failed to fork: %1").arg(strerror(errno))); return NULL; } @@ -425,9 +427,9 @@ void TrayLabelMgr::notifySysTrayAbsence() if (state == SysTrayPresent) return; // So sweet of the systray to come back so soon - if (QMessageBox::warning(NULL, tr("KDocker"), - tr("The System tray was hidden or removed"), - tr("Undock All"), tr("Ignore")) == 0) + if (QMessageBox::warning(NULL, i18n("KDocker"), + i18n("The System tray was hidden or removed"), + i18n("Undock All"), i18n("Ignore")) == 0) undockAll(); } |