From ec89518efaa5538a3b9ffdfde202c6c416b1ce9d Mon Sep 17 00:00:00 2001 From: Kaj Wallin Date: Fri, 4 Jun 2010 08:48:33 +0300 Subject: [PATCH] New version of the localization Reviewed by: --- src/common.h | 2 +- src/main.cpp | 9 +++++++-- src/src.pro | 2 +- src/ui/logindialog.cpp | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common.h b/src/common.h index 8fd2fd4..26fbb04 100644 --- a/src/common.h +++ b/src/common.h @@ -52,7 +52,7 @@ const QString FACEBOOK_LOGIN_ENDING = "&fbconnect=true&return_session=true&"; const QString SESSION_EXPIRED = QObject::tr("Session expired. Please login again"); const QString LOGIN_FAILED = QObject::tr("Invalid E-mail address or password"); const QString UPDATE_FAILED = QObject::tr("Update failed, please try again"); -const QString DATA_RETRIEVAL_FAILED = QObject::tr("Data retrieval failed, plaease try again"); +const QString DATA_RETRIEVAL_FAILED = QObject::tr("Data retrieval failed, please try again"); const QString ADDRESS_RETRIEVAL_FAILED = QObject::tr("Address retrieval failed, please try again"); const QString DOWNLOAD_FAILED = QObject::tr("Image download failed"); diff --git a/src/main.cpp b/src/main.cpp index db65c5a..50e4337 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,15 +19,20 @@ USA. */ -#include +#include #include +#include #include "engine/engine.h" int main(int argc, char *argv[]) { - QTranslator translator; QApplication a(argc, argv); + QString locale = QLocale::system().name(); + qWarning() << "LOCALE:" << locale; + QTranslator translator; + translator.load("situare_" + QLocale::system().name()); + a.installTranslator(&translator); SituareEngine engine; int appRet = a.exec(); return appRet; diff --git a/src/src.pro b/src/src.pro index 932fdf7..534cc88 100644 --- a/src/src.pro +++ b/src/src.pro @@ -97,7 +97,7 @@ QT += network \ webkit DEFINES += QT_NO_DEBUG_OUTPUT -TRANSLATIONS = situare_fi.ts +TRANSLATIONS = tr_fi.ts maemo5 | simulator { armel { diff --git a/src/ui/logindialog.cpp b/src/ui/logindialog.cpp index a274a80..8077193 100644 --- a/src/ui/logindialog.cpp +++ b/src/ui/logindialog.cpp @@ -39,7 +39,7 @@ LoginDialog::LoginDialog(QWidget *parent) QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Vertical); QPushButton *connectButton = buttonBox->addButton(QDialogButtonBox::Ok); QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel); - connectButton->setText(tr("Connect")); + connectButton->setText(tr("Login")); QFormLayout *form = new QFormLayout(); form->addRow(new QLabel(tr("E-mail:")), m_emailEdit); -- 1.7.9.5