Skip to content

Commit

Permalink
fix(internal/locale): 正常处理系统语言标签格式不正确的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Aug 22, 2021
1 parent c7160ba commit 0fd5ea9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/locale/locale.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ var locales embed.FS
var b *catalog.Builder

func NewPrinter() (*message.Printer, error) {
systag, err := localeutil.SystemLanguageTag()
if err != nil {
return nil, err
}
systag, _ := localeutil.SystemLanguageTag() // 即使出错,依然会返回 language.Tag

if b == nil {
matchs, err := fs.Glob(locales, "*.yaml")
Expand Down

0 comments on commit 0fd5ea9

Please sign in to comment.