webapi: Power: Show language independent webapi messages

This commit is contained in:
Thomas Basler 2022-12-23 20:42:39 +01:00
parent 5bc264f4d2
commit 793f0c5d99
3 changed files with 7 additions and 3 deletions

View File

@ -80,7 +80,9 @@
"9009": "Sekunde muss eine Zahl zwischen {min} und {max} sein!", "9009": "Sekunde muss eine Zahl zwischen {min} und {max} sein!",
"9010": "Uhrzeit aktualisiert!", "9010": "Uhrzeit aktualisiert!",
"10001": "Das Passwort muss zwischen 8 und {max} Zeichen lang sein!", "10001": "Das Passwort muss zwischen 8 und {max} Zeichen lang sein!",
"10002": "Authentifizierung erfolgreich!" "10002": "Authentifizierung erfolgreich!",
"11001": "@:apiresponse.2001",
"11002": "@:apiresponse:5004"
}, },
"home": { "home": {
"LiveData": "Live Daten", "LiveData": "Live Daten",

View File

@ -80,7 +80,9 @@
"9009": "Second must be a number between {min} and {max}!", "9009": "Second must be a number between {min} and {max}!",
"9010": "Time updated!", "9010": "Time updated!",
"10001": "Password must between 8 and {max} characters long!", "10001": "Password must between 8 and {max} characters long!",
"10002": "Authentication successfull!" "10002": "Authentication successfull!",
"11001": "@:apiresponse.2001",
"11002": "@:apiresponse:5004"
}, },
"home": { "home": {
"LiveData": "Live Data", "LiveData": "Live Data",

View File

@ -654,7 +654,7 @@ export default defineComponent({
if (response.type == "success") { if (response.type == "success") {
this.powerSettingView.hide(); this.powerSettingView.hide();
} else { } else {
this.alertMessagePower = response.message; this.alertMessagePower = this.$t('apiresponse.' + response.code, response.param);
this.alertTypePower = response.type; this.alertTypePower = response.type;
this.showAlertPower = true; this.showAlertPower = true;
} }