updated german translation
parent
5e40675829
commit
1d4563c6af
|
|
@ -115,7 +115,7 @@ void IntegrationPluginLifx::startPairing(ThingPairingInfo *info)
|
|||
if (reply->error() == QNetworkReply::NetworkError::HostNotFoundError) {
|
||||
info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("LIFX server is not reachable."));
|
||||
} else {
|
||||
info->finish(Thing::ThingErrorNoError, "Please enter your Token and password. Get the token from https://cloud.lifx.com/settings");
|
||||
info->finish(Thing::ThingErrorNoError, QT_TR_NOOP("Please enter your user name and token. Get the token from https://cloud.lifx.com/settings"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -134,7 +134,7 @@ void IntegrationPluginLifx::confirmPairing(ThingPairingInfo *info, const QString
|
|||
// check HTTP status code
|
||||
if (status != 200) {
|
||||
// Error setting up device with invalid token
|
||||
info->finish(Thing::ThingErrorAuthenticationFailure, QT_TR_NOOP("This token is invalid."));
|
||||
info->finish(Thing::ThingErrorAuthenticationFailure, QT_TR_NOOP("The token is invalid."));
|
||||
return;
|
||||
}
|
||||
qCDebug(dcLifx()) << "Confirm pairing successfull";
|
||||
|
|
@ -237,8 +237,9 @@ void IntegrationPluginLifx::setupThing(ThingSetupInfo *info)
|
|||
connect(lifxCloud, &LifxCloud::authenticationChanged, this, &IntegrationPluginLifx::onLifxCloudAuthenticationChanged);
|
||||
lifxCloud->setAuthorizationToken(token);
|
||||
lifxCloud->listLights();
|
||||
|
||||
//TODO try setup again if it failes
|
||||
QTimer::singleShot(2000, info, [this, info] {
|
||||
setupThing(info);
|
||||
});
|
||||
} else {
|
||||
Q_ASSERT_X(false, "setupThing", QString("Unhandled thingClassId: %1").arg(thing->thingClassId().toString()).toUtf8());
|
||||
}
|
||||
|
|
@ -247,13 +248,12 @@ void IntegrationPluginLifx::setupThing(ThingSetupInfo *info)
|
|||
void IntegrationPluginLifx::postSetupThing(Thing *thing)
|
||||
{
|
||||
if (!m_pluginTimer) {
|
||||
m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(60);
|
||||
m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(15);
|
||||
connect(m_pluginTimer, &PluginTimer::timeout, this, [this]() {
|
||||
foreach (LifxLan *lifx, m_lifxLanConnections) {
|
||||
Q_UNUSED(lifx)
|
||||
//TODO update LAN device states
|
||||
}
|
||||
|
||||
foreach (LifxCloud *lifx, m_lifxCloudConnections) {
|
||||
lifx->listLights();
|
||||
}
|
||||
|
|
@ -275,6 +275,7 @@ void IntegrationPluginLifx::executeAction(ThingActionInfo *info)
|
|||
LifxCloud *lifxCloud;
|
||||
|
||||
if (m_lifxLanConnections.contains(thing)) {
|
||||
// Local connection first
|
||||
lifx = m_lifxLanConnections.value(thing);
|
||||
} else if (m_lifxCloudConnections.contains(myThings().findById(thing->parentId()))) {
|
||||
lifxCloud = m_lifxCloudConnections.value(myThings().findById(thing->parentId()));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
include(../plugins.pri)
|
||||
|
||||
QT += network
|
||||
|
||||
SOURCES += \
|
||||
integrationpluginlifx.cpp \
|
||||
lifxcloud.cpp \
|
||||
lifxlan.cpp \
|
||||
|
||||
HEADERS += \
|
||||
integrationpluginlifx.h \
|
||||
lifxcloud.h \
|
||||
lifxlan.h \
|
||||
|
||||
|
|
@ -5,11 +5,11 @@
|
|||
<name>IntegrationPluginLifx</name>
|
||||
<message>
|
||||
<source>LIFX server is not reachable.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>LIFX Server ist nicht erreichbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This token is invalid.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Der Token ist ungültig</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -193,41 +193,41 @@ The name of the ActionType ({8bd20350-0e79-45dc-b68a-84da99356863}) of ThingClas
|
|||
<extracomment>The name of the ParamType (ThingClass: lifxAccount, EventType: connected, ID: {3e7b358b-d7de-4db4-8a3a-b9860eae186f})
|
||||
----------
|
||||
The name of the StateType ({3e7b358b-d7de-4db4-8a3a-b9860eae186f}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Verbunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connected changed</source>
|
||||
<extracomment>The name of the EventType ({3e7b358b-d7de-4db4-8a3a-b9860eae186f}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Verbunden geändert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LIFX cloud account</source>
|
||||
<extracomment>The name of the ThingClass ({387c87f6-3e5b-4d6a-ba4d-372d0efad79f})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>LIFX Cloud-Account</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logged in</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: lifxAccount, EventType: loggedIn, ID: {0db34069-5de0-4233-baec-27f039228524})
|
||||
----------
|
||||
The name of the StateType ({0db34069-5de0-4233-baec-27f039228524}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Eingelogged</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logged in changed</source>
|
||||
<extracomment>The name of the EventType ({0db34069-5de0-4233-baec-27f039228524}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Eingelogged geändert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User name</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: lifxAccount, EventType: userDisplayName, ID: {554afd9b-a2ec-4d28-9065-2b9ab3a9e3b2})
|
||||
----------
|
||||
The name of the StateType ({554afd9b-a2ec-4d28-9065-2b9ab3a9e3b2}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Benutzername</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User name changed</source>
|
||||
<extracomment>The name of the EventType ({554afd9b-a2ec-4d28-9065-2b9ab3a9e3b2}) of ThingClass lifxAccount</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Benutzername geändert</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
Loading…
Reference in New Issue