Merge pull request #146 in YR/star-web-components from fixbug_l10n to master

* commit '64c022eba2c551cb19ca418d67ed1fd6bfd43ad2':
  修复L10n加载语言资源的同时会更改首选语言的bug
This commit is contained in:
汪昌棋 2022-11-15 10:07:28 +08:00
commit 82bf025678
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ class L10nHelper {
}
})
shouldRequest.length && this.l10n.ctx.requestLocales(...shouldRequest)
for (const lang of shouldRequest) {
const locale = this.l10n.ctx.getLocale(lang)
locale.build()
}
})
}