Add error messages to translations

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-08-17 10:56:43 +02:00
parent 5059747156
commit 47119bd296
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
2 changed files with 6 additions and 2 deletions

View file

@ -53,6 +53,10 @@
"header": "Bot-Health" "header": "Bot-Health"
} }
}, },
"errors": {
"loginFailedAccessDenied": "Access denied to this bot instance",
"loginFailedUnexpectedStatus": "Login failed unexpectedly"
},
"menu": { "menu": {
"headers": { "headers": {
"chatInteraction": "Chat Interaction", "chatInteraction": "Chat Interaction",

View file

@ -177,9 +177,9 @@ const app = createApp({
}) })
.then((resp: Response): any => { .then((resp: Response): any => {
if (resp.status !== 200) { if (resp.status !== 200) {
let errorText = 'Login failed unexpectedly' let errorText = this.$t('errors.loginFailedUnexpectedStatus')
if (resp.status === 403) { if (resp.status === 403) {
errorText = 'Access denied to this bot instance' errorText = this.$t('errors.loginFailedAccessDenied')
} }
this.bus.emit(BusEventTypes.LoginProcessing, false) this.bus.emit(BusEventTypes.LoginProcessing, false)