From: Mateusz Półrola Date: Tue, 7 Sep 2010 09:31:46 +0000 (+0200) Subject: some changes in translations X-Git-Url: http://git.maemo.org/git/?a=commitdiff_plain;h=6594c63c9925f07d851cfe99fa8366fb92ddeaae;p=mdictionary some changes in translations --- diff --git a/data/gui.qrc b/data/gui.qrc index 65aa8e7..03cab88 100644 --- a/data/gui.qrc +++ b/data/gui.qrc @@ -7,10 +7,10 @@ icons/48x48/edit-select-all.png icons/16x16/staron.png icons/16x16/staroff.png - translations/dict_pl.qm - translations/dict_en.qm config/mdictionary.config xsl/style.css xsl/xsl.xsl + translations/en_US.qm + translations/pl_PL.qm diff --git a/data/translations/dict_en.qm b/data/translations/dict_en.qm deleted file mode 100644 index 9dad8df..0000000 Binary files a/data/translations/dict_en.qm and /dev/null differ diff --git a/data/translations/dict_pl.qm b/data/translations/dict_pl.qm deleted file mode 100644 index 47e96e8..0000000 Binary files a/data/translations/dict_pl.qm and /dev/null differ diff --git a/src/mdictionary/gui/main.cpp b/src/mdictionary/gui/main.cpp index efdf082..2982155 100644 --- a/src/mdictionary/gui/main.cpp +++ b/src/mdictionary/gui/main.cpp @@ -54,6 +54,25 @@ QStringList parseParameters(int argc, char *argv[]) { return result; } +void retranslate() { + QString locale = QLocale::system().name(); + + QTranslator translator; + QTranslator qtTranslator; + + qtTranslator.load("qt_" + locale, + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + QCoreApplication::installTranslator(&qtTranslator); + + qDebug()<("Notify"); qRegisterMetaType("Notify::NotifyType"); - QString locale = QLocale::system().name(); - - QTranslator qtTranslator; - qtTranslator.load("qt_" + locale, - QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - - a.installTranslator(&qtTranslator); - - QTranslator mdictionaryTranslator; - - if(locale == "pl_PL") - mdictionaryTranslator.load(":/translations/dict_pl"); - - else - - mdictionaryTranslator.load(":/translations/dict_en"); - - a.installTranslator(&mdictionaryTranslator); + retranslate(); Backbone backbone; MainWindow w(&backbone); diff --git a/src/mdictionary/mdictionary.pro b/src/mdictionary/mdictionary.pro index cd5fd50..afa7f87 100644 --- a/src/mdictionary/mdictionary.pro +++ b/src/mdictionary/mdictionary.pro @@ -59,8 +59,8 @@ HEADERS += gui/MainWindow.h \ RESOURCES += ../../data/gui.qrc -TRANSLATIONS += dict_pl.ts \ - dict_en.ts +TRANSLATIONS += pl_PL.ts \ + en_US.ts target.path = $$BIN_DIR INSTALLS += target diff --git a/src/plugins/google/GooglePlugin.cpp b/src/plugins/google/GooglePlugin.cpp index 20df8aa..95ae0e4 100644 --- a/src/plugins/google/GooglePlugin.cpp +++ b/src/plugins/google/GooglePlugin.cpp @@ -51,8 +51,8 @@ void GooglePlugin::retranslate() { QTranslator *translator = new QTranslator(this); - if(!translator->load(":/translations/" + locale)) { - translator->load(":/translations/en_EN"); + if(!translator->load(":/google/translations/" + locale)) { + translator->load(":/google/translations/en_US"); } QCoreApplication::installTranslator(translator); } diff --git a/src/plugins/google/google.pro b/src/plugins/google/google.pro index 85aec3b..48633dc 100644 --- a/src/plugins/google/google.pro +++ b/src/plugins/google/google.pro @@ -18,8 +18,8 @@ HEADERS += \ GoogleDictDialog.h \ GoogleDialog.h -TRANSLATIONS += dict_google_pl.ts \ - dict_google_en.ts +TRANSLATIONS += pl_PL.ts \ + en_US.ts RESOURCES += \ google.qrc diff --git a/src/plugins/google/google.qrc b/src/plugins/google/google.qrc index 47a4287..473e92a 100644 --- a/src/plugins/google/google.qrc +++ b/src/plugins/google/google.qrc @@ -1,6 +1,6 @@ - - translations/en_EN.qm + translations/pl_PL.qm + translations/en_US.qm diff --git a/src/plugins/google/translations/en_EN.qm b/src/plugins/google/translations/en_EN.qm deleted file mode 100644 index 9dad8df..0000000 Binary files a/src/plugins/google/translations/en_EN.qm and /dev/null differ diff --git a/src/plugins/google/translations/pl_PL.qm b/src/plugins/google/translations/pl_PL.qm index 24a516f..a546bd7 100644 Binary files a/src/plugins/google/translations/pl_PL.qm and b/src/plugins/google/translations/pl_PL.qm differ diff --git a/src/plugins/xdxf/XdxfDialog.cpp b/src/plugins/xdxf/XdxfDialog.cpp index 04bf67d..5ef8d24 100644 --- a/src/plugins/xdxf/XdxfDialog.cpp +++ b/src/plugins/xdxf/XdxfDialog.cpp @@ -104,7 +104,7 @@ void XdxfDialog::initializeUI() { #endif cacheLayout = new QHBoxLayout; - cacheCheckBox = new QCheckBox(tr("Optimize for quicker searches")); + cacheCheckBox = new QCheckBox(tr("Optimize")); cacheCheckBox->setToolTip(cacheToolTip); cacheLayout->addWidget(cacheCheckBox); #ifdef Q_WS_MAEMO_5 diff --git a/src/plugins/xdxf/translations/en_EN.qm b/src/plugins/xdxf/translations/en_EN.qm deleted file mode 100644 index 900f716..0000000 Binary files a/src/plugins/xdxf/translations/en_EN.qm and /dev/null differ diff --git a/src/plugins/xdxf/translations/pl_PL.qm b/src/plugins/xdxf/translations/pl_PL.qm index 8ab7e05..a9dec1f 100644 Binary files a/src/plugins/xdxf/translations/pl_PL.qm and b/src/plugins/xdxf/translations/pl_PL.qm differ diff --git a/src/plugins/xdxf/xdxf.pro b/src/plugins/xdxf/xdxf.pro index f8dc5db..d609a39 100644 --- a/src/plugins/xdxf/xdxf.pro +++ b/src/plugins/xdxf/xdxf.pro @@ -24,8 +24,8 @@ HEADERS += \ RESOURCES += \ xdxf.qrc -TRANSLATIONS += dict_xdxf_pl.ts \ - dict_xdxf_en.ts +TRANSLATIONS += pl_PL.ts \ + en_US.ts unix { INSTALLS += dicts plugin-icon diff --git a/src/plugins/xdxf/xdxf.qrc b/src/plugins/xdxf/xdxf.qrc index 47a4287..0642344 100644 --- a/src/plugins/xdxf/xdxf.qrc +++ b/src/plugins/xdxf/xdxf.qrc @@ -1,6 +1,6 @@ - - translations/en_EN.qm + translations/pl_PL.qm + translations/en_US.qm diff --git a/src/plugins/xdxf/xdxfplugin.cpp b/src/plugins/xdxf/xdxfplugin.cpp index a3a7846..8751e42 100644 --- a/src/plugins/xdxf/xdxfplugin.cpp +++ b/src/plugins/xdxf/xdxfplugin.cpp @@ -55,8 +55,8 @@ void XdxfPlugin::retranslate() { QTranslator *translator = new QTranslator(this); - if(!translator->load(":/translations/" + locale)) { - translator->load(":/translations/en_EN"); + if(!translator->load(":/xdxf/translations/" + locale)) { + translator->load(":/xdxf/translations/en_US"); } QCoreApplication::installTranslator(translator); }