Skip to content

Commit

Permalink
Fix lang change error. (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykuku authored Nov 22, 2024
1 parent 566a243 commit 92aae89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .env.dev
NODE_ENV=dev
#VUE_APP_DEV_IP=demo.casaos.io
VUE_APP_DEV_IP=10.0.0.90
VUE_APP_DEV_IP=10.0.0.85
# VUE_APP_DEV_IP=10.147.20.1
# VUE_APP_DEV_IP=192.168.2.15
# VUE_APP_DEV_IP=192.168.2.219
Expand Down
4 changes: 3 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default {
setInitLang() {
let lang = localStorage.getItem('lang') ? localStorage.getItem('lang') : this.getLangFromBrowser()
lang = lang.includes("_") ? lang : "en_us";
lang = lang.toLowerCase();
this.setLang(lang)
},
/**
Expand All @@ -99,7 +100,8 @@ export default {
console.log('socket connected');
},
"casaos-ui:topbar:dashboardsetting_language"(res) {
this.setLang(res.Properties.casaos_lang)
const lang = res.Properties.casaos_lang.toLowerCase();
this.setLang(lang)
},
},
}
Expand Down

0 comments on commit 92aae89

Please sign in to comment.