Remove unneeded translations

This commit is contained in:
Simon Stürz 2021-09-03 13:20:30 +02:00
parent 982d592148
commit 2385a73c50
3 changed files with 18 additions and 129 deletions

View File

@ -188,7 +188,7 @@ void IntegrationPluginKeba::postSetupThing(Thing *thing)
} }
keba->getReport2(); keba->getReport2();
keba->getReport3(); keba->getReport3();
if (thing->stateValue(wallboxActivityStateTypeId).toString() == QT_TR_NOOP("Charging")) { if (thing->stateValue(wallboxActivityStateTypeId).toString() == "Charging") {
keba->getReport1XX(100); keba->getReport1XX(100);
} }
} }
@ -228,22 +228,22 @@ void IntegrationPluginKeba::setDeviceState(Thing *thing, KeContact::State state)
{ {
switch (state) { switch (state) {
case KeContact::StateStarting: case KeContact::StateStarting:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Starting")); thing->setStateValue(wallboxActivityStateTypeId, "Starting");
break; break;
case KeContact::StateNotReady: case KeContact::StateNotReady:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Not ready for charging")); thing->setStateValue(wallboxActivityStateTypeId, "Not ready for charging");
break; break;
case KeContact::StateReady: case KeContact::StateReady:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Ready for charging")); thing->setStateValue(wallboxActivityStateTypeId, "Ready for charging");
break; break;
case KeContact::StateCharging: case KeContact::StateCharging:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Charging")); thing->setStateValue(wallboxActivityStateTypeId, "Charging");
break; break;
case KeContact::StateError: case KeContact::StateError:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Error")); thing->setStateValue(wallboxActivityStateTypeId, "Error");
break; break;
case KeContact::StateAuthorizationRejected: case KeContact::StateAuthorizationRejected:
thing->setStateValue(wallboxActivityStateTypeId, QT_TR_NOOP("Authorization rejected")); thing->setStateValue(wallboxActivityStateTypeId, "Authorization rejected");
break; break;
} }
} }
@ -252,26 +252,27 @@ void IntegrationPluginKeba::setDevicePlugState(Thing *thing, KeContact::PlugStat
{ {
switch (plugState) { switch (plugState) {
case KeContact::PlugStateUnplugged: case KeContact::PlugStateUnplugged:
thing->setStateValue(wallboxPlugStateStateTypeId, QT_TR_NOOP("Unplugged")); thing->setStateValue(wallboxPlugStateStateTypeId, "Unplugged");
thing->setStateValue(wallboxPluggedInStateTypeId, false);
break; break;
case KeContact::PlugStatePluggedOnChargingStation: case KeContact::PlugStatePluggedOnChargingStation:
thing->setStateValue(wallboxPlugStateStateTypeId, QT_TR_NOOP("Plugged in charging station")); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in charging station");
thing->setStateValue(wallboxPluggedInStateTypeId, false);
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPluggedOnEV: case KeContact::PlugStatePluggedOnChargingStationAndPluggedOnEV:
thing->setStateValue(wallboxPlugStateStateTypeId, QT_TR_NOOP("Plugged in on EV")); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV");
thing->setStateValue(wallboxPluggedInStateTypeId, true);
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPlugLocked: case KeContact::PlugStatePluggedOnChargingStationAndPlugLocked:
thing->setStateValue(wallboxPlugStateStateTypeId, QT_TR_NOOP("Plugged in and locked")); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in and locked");
thing->setStateValue(wallboxPluggedInStateTypeId, false);
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPlugLockedAndPluggedOnEV: case KeContact::PlugStatePluggedOnChargingStationAndPlugLockedAndPluggedOnEV:
thing->setStateValue(wallboxPlugStateStateTypeId, QT_TR_NOOP("Plugged in on EV and locked")); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV and locked");
thing->setStateValue(wallboxPluggedInStateTypeId, true);
break; break;
} }
if (plugState >= 5) {
thing->setStateValue(wallboxPluggedInStateTypeId, true);
} else {
thing->setStateValue(wallboxPluggedInStateTypeId, false);
}
} }
void IntegrationPluginKeba::searchNetworkDevices() void IntegrationPluginKeba::searchNetworkDevices()

View File

@ -8,62 +8,6 @@
<source>Error opening network port.</source> <source>Error opening network port.</source>
<translation>Fehler beim Öffnen des Netzwerkports.</translation> <translation>Fehler beim Öffnen des Netzwerkports.</translation>
</message> </message>
<message>
<location filename="../integrationpluginkeba.cpp" line="191"/>
<location filename="../integrationpluginkeba.cpp" line="240"/>
<source>Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="231"/>
<source>Starting</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="234"/>
<source>Not ready for charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="237"/>
<source>Ready for charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="243"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="246"/>
<source>Authorization rejected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="255"/>
<source>Unplugged</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="259"/>
<source>Plugged in charging station</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="263"/>
<source>Plugged in on EV</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="267"/>
<source>Plugged in and locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="271"/>
<source>Plugged in on EV and locked</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>KebaKeContact</name> <name>KebaKeContact</name>

View File

@ -8,62 +8,6 @@
<source>Error opening network port.</source> <source>Error opening network port.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../integrationpluginkeba.cpp" line="191"/>
<location filename="../integrationpluginkeba.cpp" line="240"/>
<source>Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="231"/>
<source>Starting</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="234"/>
<source>Not ready for charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="237"/>
<source>Ready for charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="243"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="246"/>
<source>Authorization rejected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="255"/>
<source>Unplugged</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="259"/>
<source>Plugged in charging station</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="263"/>
<source>Plugged in on EV</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="267"/>
<source>Plugged in and locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../integrationpluginkeba.cpp" line="271"/>
<source>Plugged in on EV and locked</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>KebaKeContact</name> <name>KebaKeContact</name>