diff options
Diffstat (limited to 'langs/i18n/i18n.go')
-rw-r--r-- | langs/i18n/i18n.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/langs/i18n/i18n.go b/langs/i18n/i18n.go index 83144b89c..c0eac5837 100644 --- a/langs/i18n/i18n.go +++ b/langs/i18n/i18n.go @@ -66,12 +66,11 @@ func (t Translator) Func(lang string) translateFunc { func (t Translator) initFuncs(bndl *i18n.Bundle) { enableMissingTranslationPlaceholders := t.cfg.GetBool("enableMissingTranslationPlaceholders") for _, lang := range bndl.LanguageTags() { - currentLang := lang currentLangStr := currentLang.String() - currentLangKey := strings.TrimPrefix(currentLangStr, artificialLangTagPrefix) + // This may be pt-BR; make it case insensitive. + currentLangKey := strings.ToLower(strings.TrimPrefix(currentLangStr, artificialLangTagPrefix)) localizer := i18n.NewLocalizer(bndl, currentLangStr) - t.translateFuncs[currentLangKey] = func(translationID string, templateData interface{}) string { var pluralCount interface{} |