diff --git a/tempo/integrationplugintempo.cpp b/tempo/integrationplugintempo.cpp
index 06378a46..856c1efa 100644
--- a/tempo/integrationplugintempo.cpp
+++ b/tempo/integrationplugintempo.cpp
@@ -59,7 +59,7 @@ void IntegrationPluginTempo::startPairing(ThingPairingInfo *info)
info->finish(Thing::ThingErrorNoError, QT_TR_NOOP("Please enter your Tempo API integration token."));
} else {
qCWarning(dcTempo()) << "Got online check error" << reply->error() << reply->errorString();
- info->finish(Thing::ThingErrorSetupFailed, tr("Tempo server not reachable, please check the internet connection."));
+ info->finish(Thing::ThingErrorSetupFailed, QT_TR_NOOP("Tempo server not reachable, please check the internet connection."));
}
});
} else {
@@ -196,6 +196,8 @@ void IntegrationPluginTempo::setupThing(ThingSetupInfo *info)
connect(tempo, &Tempo::accountWorklogsReceived, this, &IntegrationPluginTempo::onAccountWorkloadReceived);
connect(tempo, &Tempo::teamWorklogsReceived, this, &IntegrationPluginTempo::onTeamWorkloadReceived);
info->finish(Thing::ThingErrorNoError);
+ } else {
+ info->finish(Thing::ThingErrorAuthenticationFailure, tr("The Token seems to be expired."));
}
});
tempo->getAccounts();
diff --git a/tempo/tempo.cpp b/tempo/tempo.cpp
index 93f40062..b0f698fa 100644
--- a/tempo/tempo.cpp
+++ b/tempo/tempo.cpp
@@ -225,10 +225,9 @@ void Tempo::getWorkloadByTeam(int teamId, QDate from, QDate to, int offset, int
void Tempo::setAuthenticated(bool state)
{
- if (state != m_authenticated) {
- m_authenticated = state;
- emit authenticationStatusChanged(state);
- }
+ // We'll want to emit this in any case, even if it going from false to false, so we can properly handle the expired token case
+ m_authenticated = state;
+ emit authenticationStatusChanged(state);
}
void Tempo::setConnected(bool state)
diff --git a/tempo/translations/809bc4ca-d1cd-4279-9e0d-7324537ccb5a-en_US.ts b/tempo/translations/809bc4ca-d1cd-4279-9e0d-7324537ccb5a-en_US.ts
index 6e5bf7fd..7a2e9dd8 100644
--- a/tempo/translations/809bc4ca-d1cd-4279-9e0d-7324537ccb5a-en_US.ts
+++ b/tempo/translations/809bc4ca-d1cd-4279-9e0d-7324537ccb5a-en_US.ts
@@ -23,204 +23,110 @@
Token is not available.
+
+
+ The Token seems to be expired.
+
+ tempo
-
+ AccountThe name of the ThingClass ({8be71352-bdfd-450b-903e-79a4ed203701})
-
-
+ Category
- The name of the ParamType (ThingClass: account, EventType: category, ID: {3af6d1c0-bb0a-406f-809b-2c367e1a16bb})
-----------
-The name of the StateType ({3af6d1c0-bb0a-406f-809b-2c367e1a16bb}) of ThingClass account
+ The name of the StateType ({3af6d1c0-bb0a-406f-809b-2c367e1a16bb}) of ThingClass account
-
- Category changed
- The name of the EventType ({3af6d1c0-bb0a-406f-809b-2c367e1a16bb}) of ThingClass account
-
-
-
-
-
-
-
-
-
+
+
+ Connected
- The name of the ParamType (ThingClass: team, EventType: connected, ID: {a125d3b5-676f-49eb-bb93-feae233c2e91})
-----------
-The name of the StateType ({a125d3b5-676f-49eb-bb93-feae233c2e91}) of ThingClass team
-----------
-The name of the ParamType (ThingClass: account, EventType: connected, ID: {0b776bc1-9e56-4205-9bc3-b356026f5b64})
+ The name of the StateType ({a125d3b5-676f-49eb-bb93-feae233c2e91}) of ThingClass team
----------
The name of the StateType ({0b776bc1-9e56-4205-9bc3-b356026f5b64}) of ThingClass account
----------
-The name of the ParamType (ThingClass: tempoConnection, EventType: connected, ID: {15f45315-5419-4e1b-ace3-fc21503d3b70})
-----------
The name of the StateType ({15f45315-5419-4e1b-ace3-fc21503d3b70}) of ThingClass tempoConnection
-
-
-
- Connected changed
- The name of the EventType ({a125d3b5-676f-49eb-bb93-feae233c2e91}) of ThingClass team
-----------
-The name of the EventType ({0b776bc1-9e56-4205-9bc3-b356026f5b64}) of ThingClass account
-----------
-The name of the EventType ({15f45315-5419-4e1b-ace3-fc21503d3b70}) of ThingClass tempoConnection
-
-
-
-
-
+ Contact
- The name of the ParamType (ThingClass: account, EventType: contact, ID: {ece43b12-4a0d-4e25-b811-b1aca610bea8})
-----------
-The name of the StateType ({ece43b12-4a0d-4e25-b811-b1aca610bea8}) of ThingClass account
+ The name of the StateType ({ece43b12-4a0d-4e25-b811-b1aca610bea8}) of ThingClass account
-
- Contact changed
- The name of the EventType ({ece43b12-4a0d-4e25-b811-b1aca610bea8}) of ThingClass account
-
-
-
-
-
+ Customer
- The name of the ParamType (ThingClass: account, EventType: Customer, ID: {3dcc1426-51f8-46fa-9967-5a93d7bb2633})
-----------
-The name of the StateType ({3dcc1426-51f8-46fa-9967-5a93d7bb2633}) of ThingClass account
+ The name of the StateType ({3dcc1426-51f8-46fa-9967-5a93d7bb2633}) of ThingClass account
-
- Customer changed
- The name of the EventType ({3dcc1426-51f8-46fa-9967-5a93d7bb2633}) of ThingClass account
-
-
-
-
-
+ Global
- The name of the ParamType (ThingClass: account, EventType: global, ID: {abd55ea0-ad4e-413e-bc77-3e8b7f0a9be4})
-----------
-The name of the StateType ({abd55ea0-ad4e-413e-bc77-3e8b7f0a9be4}) of ThingClass account
+ The name of the StateType ({abd55ea0-ad4e-413e-bc77-3e8b7f0a9be4}) of ThingClass account
-
- Global changed
- The name of the EventType ({abd55ea0-ad4e-413e-bc77-3e8b7f0a9be4}) of ThingClass account
-
-
-
-
+ IdThe name of the ParamType (ThingClass: team, Type: thing, ID: {bb90e986-fcfa-47e8-8783-f2b5a887314a})
-
+ KeyThe name of the ParamType (ThingClass: account, Type: thing, ID: {c6aeddae-56af-496d-a419-1635ff9bae50})
-
-
-
-
+
+ Lead
- The name of the ParamType (ThingClass: team, EventType: lead, ID: {667a9d8d-4e80-4c7c-938c-d698853fa4b1})
-----------
-The name of the StateType ({667a9d8d-4e80-4c7c-938c-d698853fa4b1}) of ThingClass team
-----------
-The name of the ParamType (ThingClass: account, EventType: lead, ID: {f1f2af66-d09a-4242-9058-401145f662c4})
+ The name of the StateType ({667a9d8d-4e80-4c7c-938c-d698853fa4b1}) of ThingClass team
----------
The name of the StateType ({f1f2af66-d09a-4242-9058-401145f662c4}) of ThingClass account
-
-
- Lead changed
- The name of the EventType ({667a9d8d-4e80-4c7c-938c-d698853fa4b1}) of ThingClass team
-----------
-The name of the EventType ({f1f2af66-d09a-4242-9058-401145f662c4}) of ThingClass account
-
-
-
-
-
+ Logged in
- The name of the ParamType (ThingClass: tempoConnection, EventType: loggedIn, ID: {e4b5be87-dbc9-481e-88da-608c71be8bda})
-----------
-The name of the StateType ({e4b5be87-dbc9-481e-88da-608c71be8bda}) of ThingClass tempoConnection
+ The name of the StateType ({e4b5be87-dbc9-481e-88da-608c71be8bda}) of ThingClass tempoConnection
-
- Logged in changed
- The name of the EventType ({e4b5be87-dbc9-481e-88da-608c71be8bda}) of ThingClass tempoConnection
-
-
-
-
-
+ Monthly budget
- The name of the ParamType (ThingClass: account, EventType: monthlyBudget, ID: {44ebbc18-7511-48c0-860b-c4de5f634ed6})
-----------
-The name of the StateType ({44ebbc18-7511-48c0-860b-c4de5f634ed6}) of ThingClass account
+ The name of the StateType ({44ebbc18-7511-48c0-860b-c4de5f634ed6}) of ThingClass account
-
- Monthly budget changed
- The name of the EventType ({44ebbc18-7511-48c0-860b-c4de5f634ed6}) of ThingClass account
-
-
-
-
+ Start dateThe name of the ParamType (ThingClass: account, Type: settings, ID: {56c460b2-37d8-453a-b4f4-8e58be348f85})
-
-
+ Status
- The name of the ParamType (ThingClass: account, EventType: status, ID: {7948f15b-7243-404e-9e67-18e915e8b328})
-----------
-The name of the StateType ({7948f15b-7243-404e-9e67-18e915e8b328}) of ThingClass account
+ The name of the StateType ({7948f15b-7243-404e-9e67-18e915e8b328}) of ThingClass account
-
- Status changed
- The name of the EventType ({7948f15b-7243-404e-9e67-18e915e8b328}) of ThingClass account
-
-
-
-
+ TeamThe name of the ThingClass ({11c85176-e7fe-44b4-995a-24757273f3af})
-
-
+
+ TempoThe name of the vendor ({58fc1ab7-b8b5-4e52-8388-72957ce5852d})
----------
@@ -228,58 +134,28 @@ The name of the plugin tempo ({809bc4ca-d1cd-4279-9e0d-7324537ccb5a})
-
+ Tempo connectionThe name of the ThingClass ({878eae0a-6217-4b36-bd46-72c911e52e73})
-
-
-
-
+
+ This month time spent
- The name of the ParamType (ThingClass: team, EventType: monthTimeSpent, ID: {f5ec7b30-3074-41e9-b1fc-62b6307ddbe1})
-----------
-The name of the StateType ({f5ec7b30-3074-41e9-b1fc-62b6307ddbe1}) of ThingClass team
-----------
-The name of the ParamType (ThingClass: account, EventType: monthTimeSpent, ID: {81bec4e8-9fd3-43d1-b339-2a7fdd83e8cb})
+ The name of the StateType ({f5ec7b30-3074-41e9-b1fc-62b6307ddbe1}) of ThingClass team
----------
The name of the StateType ({81bec4e8-9fd3-43d1-b339-2a7fdd83e8cb}) of ThingClass account
-
-
- This month time spent changed
- The name of the EventType ({f5ec7b30-3074-41e9-b1fc-62b6307ddbe1}) of ThingClass team
-----------
-The name of the EventType ({81bec4e8-9fd3-43d1-b339-2a7fdd83e8cb}) of ThingClass account
-
-
-
-
-
-
-
+
+ Total time spent
- The name of the ParamType (ThingClass: team, EventType: totalTimeSpent, ID: {a694682e-3c2a-4146-aa56-9e75fd82bcab})
-----------
-The name of the StateType ({a694682e-3c2a-4146-aa56-9e75fd82bcab}) of ThingClass team
-----------
-The name of the ParamType (ThingClass: account, EventType: totalTimeSpent, ID: {1ac39002-56a1-4911-aa68-9d14e142edae})
+ The name of the StateType ({a694682e-3c2a-4146-aa56-9e75fd82bcab}) of ThingClass team
----------
The name of the StateType ({1ac39002-56a1-4911-aa68-9d14e142edae}) of ThingClass account
-
-
-
- Total time spent changed
- The name of the EventType ({a694682e-3c2a-4146-aa56-9e75fd82bcab}) of ThingClass team
-----------
-The name of the EventType ({1ac39002-56a1-4911-aa68-9d14e142edae}) of ThingClass account
-
-