diff --git a/telldus-gui/Plugins/Live/LiveObject.cpp b/telldus-gui/Plugins/Live/LiveObject.cpp index c5e29f0a..213a3747 100644 --- a/telldus-gui/Plugins/Live/LiveObject.cpp +++ b/telldus-gui/Plugins/Live/LiveObject.cpp @@ -85,7 +85,7 @@ void LiveObject::connectToServer() { d->socket->abort(); PrivateData::Server server = d->serverList.takeFirst(); emit errorChanged(""); - emit statusChanged("Connecting to server " + server.address); + emit statusChanged(tr("Connecting to server %1").arg(server.address)); d->socket->connectToHostEncrypted(server.address, server.port); } } @@ -115,7 +115,7 @@ void LiveObject::readyRead() { } else if (msg->name() == "registered") { d->registered = true; emit registered(msg->argument(0)); - emit errorChanged("Registered"); + emit errorChanged(tr("Registered")); } else if (msg->name() == "notregistered") { LiveMessageToken token = msg->arg(0); if (token.valueType != LiveMessageToken::Dictionary) { @@ -126,7 +126,7 @@ void LiveObject::readyRead() { QSettings s; s.setValue("Live/UUID", d->uuid); emit notRegistered(); - emit errorChanged("Not registered"); + emit errorChanged(tr("Not registered")); } else if (msg->name() == "command") { if (msg->arg(0).valueType == LiveMessageToken::Dictionary && msg->arg(0).dictVal.contains("ACK")) { int ack = msg->arg(0).dictVal["ACK"].intVal; @@ -142,7 +142,7 @@ void LiveObject::readyRead() { void LiveObject::refreshServerList() { emit errorChanged(""); - emit statusChanged("Discover servers"); + emit statusChanged(tr("Discover servers")); d->serverList.clear(); QUrl url(TELLDUS_LIVE_URI); QPair version("protocolVersion", "2"); @@ -199,7 +199,7 @@ void LiveObject::p_connected() { this->sendMessage(msg); emit errorChanged(""); - emit statusChanged("Connected"); + emit statusChanged(tr("Connected")); emit connected(); } @@ -208,7 +208,7 @@ void LiveObject::p_disconnected() { d->pongTimer.stop(); if (d->registered) { //Clear the registered status - emit errorChanged("Disconnected from server"); + emit errorChanged(tr("Disconnected from server")); } d->registered = false; } @@ -221,9 +221,9 @@ void LiveObject::stateChanged( QAbstractSocket::SocketState socketState ) { if (socketState == QAbstractSocket::UnconnectedState) { int timeout = rand() % 40 + 10; //Random timeout from 10-50s to avoid flooding the servers QTimer::singleShot(timeout*1000, this, SLOT(connectToServer())); - emit statusChanged("Reconnecting in " + QString::number(timeout) + " seconds..."); + emit statusChanged(tr("Reconnecting in %1 seconds...").arg(QString::number(timeout))); } else if (socketState == QAbstractSocket::ConnectingState) { - emit statusChanged("Connecting..."); + emit statusChanged(tr("Connecting...")); emit errorChanged(""); } } @@ -237,7 +237,7 @@ void LiveObject::sslErrors( const QList & errors ) { default: //qDebug() << "SSL" << error.errorString(); everythingOK = false; - emit statusChanged("SSL Error"); + emit statusChanged(tr("SSL Error")); emit errorChanged(error.errorString()); break; } @@ -252,7 +252,7 @@ void LiveObject::serverAssignReply( QNetworkReply *r ) { if (r->error() != QNetworkReply::NoError) { int timeout = rand() % 300 + 60; //Random timeout from 60s-6min to avoid flooding the servers emit errorChanged(r->errorString()); - emit statusChanged("Retrying in " + QString::number(timeout) + " seconds..."); + emit statusChanged(tr("Retrying in %1 seconds...").arg(QString::number(timeout))); QTimer::singleShot(timeout * 1000, this, SLOT(connectToServer())); return; } @@ -278,8 +278,8 @@ void LiveObject::serverAssignReply( QNetworkReply *r ) { QTimer::singleShot(0, this, SLOT(connectToServer())); } else { int timeout = rand() % 300 + 60; //Random timeout from 60-6min to avoid flooding the servers - emit errorChanged("No servers found"); - emit statusChanged("Retrying in " + QString::number(timeout) + " seconds..."); + emit errorChanged(tr("No servers found")); + emit statusChanged(tr("Retrying in %1 seconds...").arg(QString::number(timeout))); QTimer::singleShot(timeout * 1000, this, SLOT(connectToServer())); } } diff --git a/telldus-gui/Plugins/Live/translation_sv.ts b/telldus-gui/Plugins/Live/translation_sv.ts index 6cdfaf84..24cc7595 100644 --- a/telldus-gui/Plugins/Live/translation_sv.ts +++ b/telldus-gui/Plugins/Live/translation_sv.ts @@ -1,28 +1,107 @@ + + Form + + + Form + + + + + Status: + Status: + + + + unknown + + + + + Activate Telldus Live! + Aktivera Telldus Live! + + LiveObject - + Default browser could not be opened Standardwebbläsaren kunde inte öppnas - + We could not open your default internet browser Vi kunde inte öppna din standardwebbläsare - + Please copy the following url and enter it in your browser:<br><a href='%1'>%1</a> Kopiera följande URL och klistra in i din webbläsare:<br><a href='%1'>%1</a> + + + Connecting to server %1 + Ansluter till servern %1 + + + + Registered + Registrerad + + + + Not registered + Inte registrerad + + + + Discover servers + Söker servrar + + + + Connected + Ansluten + + + + Disconnected from server + Bortkopplad från server + + + + Reconnecting in %1 seconds... + Återansluter om %1 sekunder... + + + + Connecting... + Ansluter... + + + + SSL Error + SSL-fel + + + + + Retrying in %1 seconds... + Försöker igen om %1 sekunder... + + + + No servers found + Inga servrar kunde hittas + __init__ - + Activate Telldus Live! Aktivera Telldus Live! diff --git a/telldus-gui/Plugins/TelldusCenterPlugin.cmake b/telldus-gui/Plugins/TelldusCenterPlugin.cmake index 05afea26..4ee6386b 100644 --- a/telldus-gui/Plugins/TelldusCenterPlugin.cmake +++ b/telldus-gui/Plugins/TelldusCenterPlugin.cmake @@ -53,7 +53,7 @@ IF(Plugin_PATH) #Add all extra files FOREACH(_FILE ${Plugin_EXTRA}) GET_FILENAME_COMPONENT(ext "${CMAKE_CURRENT_SOURCE_DIR}/${_FILE}" EXT) - IF (ext STREQUAL ".qml") + IF (ext STREQUAL ".qml" OR ext STREQUAL ".ui") LIST(APPEND translation_sources "${CMAKE_CURRENT_SOURCE_DIR}/${_FILE}") ENDIF () LIST(APPEND Plugin_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${_FILE}") diff --git a/telldus-gui/TelldusCenter/TelldusCenter_sv.ts b/telldus-gui/TelldusCenter/TelldusCenter_sv.ts index 260c425e..3a8d571a 100644 --- a/telldus-gui/TelldusCenter/TelldusCenter_sv.ts +++ b/telldus-gui/TelldusCenter/TelldusCenter_sv.ts @@ -24,33 +24,33 @@ &Avsluta - + &Help &Hjälp - + About &Qt Om &Qt - + About &TelldusCenter Om &TelldusCenter - + Pages Sidor - + About TelldusCenter Om TelldusCenter - - <center><img src=':/images/TelldusCenter_128.png' width=128 height=128 /><h2>TelldusCenter %1</h2><p>Copyright &copy; 2011 Telldus Technologies AB<p></center> + + <center><img src=':/images/TelldusCenter_128.png' width=128 height=128 /><h2>TelldusCenter %1</h2><p>Copyright &copy; 2013 Telldus Technologies AB<p></center> diff --git a/telldus-gui/TelldusCenter/mainwindow.cpp b/telldus-gui/TelldusCenter/mainwindow.cpp index b0af55b4..a69729cc 100644 --- a/telldus-gui/TelldusCenter/mainwindow.cpp +++ b/telldus-gui/TelldusCenter/mainwindow.cpp @@ -135,7 +135,7 @@ void MainWindow::addWidget( const QString &page, const QIcon &icon, QWidget *wid void MainWindow::slotAboutApplication() { QMessageBox::about(this, tr("About TelldusCenter"), tr("

TelldusCenter %1

" - "

Copyright © 2011 Telldus Technologies AB

").arg(VERSION_STRING(VERSION))); + "

Copyright © 2013 Telldus Technologies AB

").arg(VERSION_STRING(VERSION))); } void MainWindow::slotConfigure() { diff --git a/telldus-gui/TelldusGui/TelldusGui_sv.ts b/telldus-gui/TelldusGui/TelldusGui_sv.ts index f66810ab..4fc813cc 100644 --- a/telldus-gui/TelldusGui/TelldusGui_sv.ts +++ b/telldus-gui/TelldusGui/TelldusGui_sv.ts @@ -171,37 +171,37 @@ DeviceWidget - + New device... Ny enhet... - + New group... Ny grupp... - + New Ny - + Edit Redigera - + Remove Ta bort - + Are you sure you want to remove the selected device? Är du säker på att du vill ta bort vald enhet? - + The device will be removed permanently from this application as well as all other applications. Enheten kommer tas bort permanent från både detta program såväl som alla andra program. @@ -240,32 +240,32 @@ Adresskod - + Please press a button on your remote Tryck en knapp på din fjärrkontroll - + If you have a TellStick Duo connected,<br>you can use it to scan the code of the remote control Om du har en TellStick Duo ansluten,<br>kan du använda den för att hitta rätt enhet och inställningar - + You must choose a device Du måste välja en enhet - + Please select the device you have. Välj den enhet du har. - + The device must have a name. Enheten måste ha ett namn. - + Please fill in a name in the field under 'Name' Skriv in ett namn i fältet 'Namn'