webapi: Maintenance: Show language independent webapi messages

This commit is contained in:
Thomas Basler 2022-12-23 19:24:39 +01:00
parent af93e5d77e
commit 7a5d8dd251
3 changed files with 7 additions and 3 deletions

View File

@ -46,7 +46,9 @@
"5001": "@:apiresponse.2001", "5001": "@:apiresponse.2001",
"5002": "Das Limit muss zwischen 1 und {max} sein!", "5002": "Das Limit muss zwischen 1 und {max} sein!",
"5003": "Ungültiten Typ angegeben!", "5003": "Ungültiten Typ angegeben!",
"5004": "Ungültigen Inverter angegeben!" "5004": "Ungültigen Inverter angegeben!",
"6001": "Neustart durchgeführt!",
"6002": "Neustart abgebrochen!"
}, },
"home": { "home": {
"LiveData": "Live Daten", "LiveData": "Live Daten",

View File

@ -46,7 +46,9 @@
"5001": "@:apiresponse.2001", "5001": "@:apiresponse.2001",
"5002": "Limit must between 1 and {max}!", "5002": "Limit must between 1 and {max}!",
"5003": "Invalid type specified!", "5003": "Invalid type specified!",
"5004": "Invalid inverter specified!" "5004": "Invalid inverter specified!",
"6001": "Reboot triggered!",
"6002": "Reboot cancled!"
}, },
"home": { "home": {
"LiveData": "Live Data", "LiveData": "Live Data",

View File

@ -79,7 +79,7 @@ export default defineComponent({
}) })
.then((response) => handleResponse(response, this.$emitter, this.$router)) .then((response) => handleResponse(response, this.$emitter, this.$router))
.then((data) => { .then((data) => {
this.alertMessage = data.message; this.alertMessage = this.$t('apiresponse.' + data.code, data.param);
this.alertType = data.type; this.alertType = data.type;
this.showAlert = true; this.showAlert = true;
}); });