Skip to content

Commit

Permalink
Add error messages to translations
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <[email protected]>
  • Loading branch information
Luzifer committed Aug 17, 2024
1 parent ba750be commit 3f3bed3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"header": "Bot-Health"
}
},
"errors": {
"loginFailedAccessDenied": "Access denied to this bot instance",
"loginFailedUnexpectedStatus": "Login failed unexpectedly"
},
"menu": {
"headers": {
"chatInteraction": "Chat Interaction",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ const app = createApp({
})
.then((resp: Response): any => {
if (resp.status !== 200) {
let errorText = 'Login failed unexpectedly'
let errorText = this.$t('errors.loginFailedUnexpectedStatus')
if (resp.status === 403) {
errorText = 'Access denied to this bot instance'
errorText = this.$t('errors.loginFailedAccessDenied')
}

this.bus.emit(BusEventTypes.LoginProcessing, false)
Expand Down

0 comments on commit 3f3bed3

Please sign in to comment.