From df6ef20c07ccd3b478aaeb7e9c4222582b2e8209 Mon Sep 17 00:00:00 2001 From: Piotrek Date: Tue, 31 Aug 2010 13:52:09 +0200 Subject: [PATCH] translation to Polish part 1 --- mdictionary.pro | 1 + trunk/src/base/gui/DictManagerWidget.cpp | 6 +++--- trunk/src/base/gui/MainWindow.cpp | 10 +++++----- trunk/src/base/gui/main.cpp | 5 +++++ .../plugins/google/src/GoogleSettingsDialog.cpp | 6 +++--- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/mdictionary.pro b/mdictionary.pro index 912067e..f741748 100644 --- a/mdictionary.pro +++ b/mdictionary.pro @@ -7,6 +7,7 @@ error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4" QT += sql TEMPLATE = subdirs SUBDIRS = trunk +TRANSLATIONS += dict_pl.ts BINDIR = $$PREFIX/bin LIBDIR = $$PREFIX/lib/$${MDICT_APPNAME} diff --git a/trunk/src/base/gui/DictManagerWidget.cpp b/trunk/src/base/gui/DictManagerWidget.cpp index c718908..76cd907 100644 --- a/trunk/src/base/gui/DictManagerWidget.cpp +++ b/trunk/src/base/gui/DictManagerWidget.cpp @@ -139,7 +139,7 @@ void DictManagerWidget::saveChanges() { if(_save) { #else if(_changed && - QMessageBox::question(this, "Save", "Do you want to save changes?", + QMessageBox::question(this, tr("Save"), tr("Do you want to save changes?"), QMessageBox::Save, QMessageBox::Cancel) == QMessageBox::Save) { #endif QList checkedDicts; @@ -184,8 +184,8 @@ void DictManagerWidget::itemSelected(QListWidgetItem *) { } void DictManagerWidget::removeButtonClicked() { - if(QMessageBox::question(this, "Remove dictionary", - "Do you want to remove selected dictionary?", + if(QMessageBox::question(this, tr("Remove dictionary"), + tr("Do you want to remove selected dictionary?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok) { QList selected = dictListWidget->selectedItems(); if(selected.count() > 0) { diff --git a/trunk/src/base/gui/MainWindow.cpp b/trunk/src/base/gui/MainWindow.cpp index 349c5e4..29b16e5 100644 --- a/trunk/src/base/gui/MainWindow.cpp +++ b/trunk/src/base/gui/MainWindow.cpp @@ -346,13 +346,13 @@ void MainWindow::showNotify(Notify::NotifyType type, QString text) { text, QMaemo5InformationBox::DefaultTimeout); #else - QMessageBox::information(this, "Information", text); + QMessageBox::information(this, tr("Information"), text); #endif break; case Notify::Warning: #ifndef Q_WS_MAEMO_5 - QMessageBox::warning(this, "Warning", text); + QMessageBox::warning(this, tr("Warning"), text); break; #endif @@ -362,7 +362,7 @@ void MainWindow::showNotify(Notify::NotifyType type, QString text) { text, QMaemo5InformationBox::NoTimeout); #else - QMessageBox::critical(this, "Error", text); + QMessageBox::critical(this, tr("Error"), text); #endif break; } @@ -555,8 +555,8 @@ void MainWindow::removeBookmarks() { #else par = this; #endif - if(QMessageBox::question(par, "Delete all bookmarks", - "Do you want to delete all bookmarks? (This action cannot be revoked)", + if(QMessageBox::question(par, tr("Delete all bookmarks"), + tr("Do you want to delete all bookmarks? (This action cannot be revoked)"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok) { backbone->removeAllBookmarks(); if(searchString.size()) diff --git a/trunk/src/base/gui/main.cpp b/trunk/src/base/gui/main.cpp index f047889..ccad6f9 100644 --- a/trunk/src/base/gui/main.cpp +++ b/trunk/src/base/gui/main.cpp @@ -63,6 +63,11 @@ int main(int argc, char *argv[]) { qRegisterMetaType >("QList"); qRegisterMetaType("Notify"); qRegisterMetaType("Notify::NotifyType"); + + QTranslator translator; + translator.load("dict_pl"); + a.installTranslator(&translator); + Backbone backbone; MainWindow w(&backbone); w.show(); diff --git a/trunk/src/plugins/google/src/GoogleSettingsDialog.cpp b/trunk/src/plugins/google/src/GoogleSettingsDialog.cpp index acd17de..e22034f 100644 --- a/trunk/src/plugins/google/src/GoogleSettingsDialog.cpp +++ b/trunk/src/plugins/google/src/GoogleSettingsDialog.cpp @@ -55,8 +55,8 @@ GoogleSettingsDialog::GoogleSettingsDialog(QWidget *parent, QIcon::fromTheme("object-flip-vertical"),tr("")); #endif - langFromLabel = new QLabel("From:"); - langToLabel = new QLabel(" To: "); + langFromLabel = new QLabel(tr("From:")); + langToLabel = new QLabel(tr(" To: ")); connectInfoLabel = new QLabel(tr("Google plugin make use of internet " "conection, so it may cost You.")); @@ -72,7 +72,7 @@ GoogleSettingsDialog::GoogleSettingsDialog(QWidget *parent, setLayout(verticalLayout); infoLabel = new QLabel; - infoLabel->setText(tr("Plugin:GoogleTranslator \n")+ + infoLabel->setText(tr("Plugin: GoogleTranslator \n")+ tr("From: ") + _langFrom + "\n" + tr("To: ") + _langTo); verticalLayout->addWidget(infoLabel); -- 1.7.9.5