Skip to content

Commit

Permalink
Merge pull request #66 from razor-1/belize-kriol
Browse files Browse the repository at this point in the history
chore: belize kriol
  • Loading branch information
razor-1 authored Jun 21, 2024
2 parents 60de7a3 + e57761d commit ad7db9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locale.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func getFallbackTag(tag language.Tag) (language.Tag, error) {
return language.LatinAmericanSpanish, nil
case "lir":
return language.English, nil
case "bzj":
return language.English, nil
}

return language.Tag{}, fmt.Errorf("no fallback for tag %s", tag.String())
Expand Down
7 changes: 7 additions & 0 deletions locale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,11 @@ func TestGetLocaleData(t *testing.T) {
l, err = localizer.GetLocaleData(tag)
ta.NoError(err)
ta.Equal("en", language.MustParse(l.Locale).String())

tag, err = language.Parse("bzj")
ta.NoError(err)
ta.Equal("bzj", tag.String())
l, err = localizer.GetLocaleData(tag)
ta.NoError(err)
ta.Equal("en", language.MustParse(l.Locale).String())
}

0 comments on commit ad7db9f

Please sign in to comment.