Skip to content

Commit

Permalink
fix: Adapt default zh-cn diaplay
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu committed Aug 11, 2023
1 parent b909009 commit 7d32508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 119 deletions.
118 changes: 0 additions & 118 deletions packages/neuron-ui/src/containers/Settings/index.tsx

This file was deleted.

6 changes: 5 additions & 1 deletion packages/neuron-wallet/src/services/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export default class SettingsService extends Store {
}

get locale() {
return this.readSync('locale')
const res = this.readSync<string>('locale')
if (locales.includes(res as Locale)) {
return res as Locale
}
return res?.startsWith('zh') ? 'zh' : 'en'
}

set locale(lng: Locale) {
Expand Down

0 comments on commit 7d32508

Please sign in to comment.