webapi: Config: Show language independent webapi messages

This commit is contained in:
Thomas Basler 2022-12-23 17:54:59 +01:00
parent 98b0a23ea0
commit ac6c10759d
3 changed files with 7 additions and 3 deletions

View File

@ -32,7 +32,9 @@
"1005": "Benötigte Werte fehlen!", "1005": "Benötigte Werte fehlen!",
"2001": "Die Seriennummer darf nicht 0 sein!", "2001": "Die Seriennummer darf nicht 0 sein!",
"2002": "Das Abfrage Interval muss größer als 0 sein!", "2002": "Das Abfrage Interval muss größer als 0 sein!",
"2003": "Ungültige Sendeleistung angegeben!" "2003": "Ungültige Sendeleistung angegeben!",
"3001": "Nichts gelöscht!",
"3002": "Konfiguration zurückgesetzt. Starte jetzt neu..."
}, },
"home": { "home": {
"LiveData": "Live Daten", "LiveData": "Live Daten",

View File

@ -32,7 +32,9 @@
"1005": "Values are missing!", "1005": "Values are missing!",
"2001": "Serial cannot be zero!", "2001": "Serial cannot be zero!",
"2002": "Poll interval must be greater zero!", "2002": "Poll interval must be greater zero!",
"2003": "Invalid power level setting!" "2003": "Invalid power level setting!",
"3001": "Not deleted anything!",
"3002": "Configuration resettet. Rebooting now..."
}, },
"home": { "home": {
"LiveData": "Live Data", "LiveData": "Live Data",

View File

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