Skip to content

Commit

Permalink
fix(webchat): changing language also updates ui (#11442)
Browse files Browse the repository at this point in the history
* fix(webchat): changing language also updates ui

* ensure the language is lowercase
  • Loading branch information
allardy committed Feb 9, 2022
1 parent 030c21a commit 29cc38a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/builtin/src/actions/switchLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const switchLanguage = async language => {
await event.setFlag(bp.IO.WellKnownFlags.FORCE_PERSIST_STATE, true)
}

return switchLanguage(args.lang)
return switchLanguage(args.lang.toLowerCase())
1 change: 1 addition & 0 deletions modules/channel-web/src/views/lite/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ class RootStore {

@action.bound
async updatePreferredLanguage(lang: string): Promise<void> {
this.updateBotUILanguage(lang)
this.preferredLanguage = lang
await this.api.updateUserPreferredLanguage(lang)
}
Expand Down

0 comments on commit 29cc38a

Please sign in to comment.