diff --git a/pkg/i18n/check.go b/pkg/i18n/checks.go similarity index 89% rename from pkg/i18n/check.go rename to pkg/i18n/checks.go index 8054ef49..9ea5b1e2 100644 --- a/pkg/i18n/check.go +++ b/pkg/i18n/checks.go @@ -49,3 +49,9 @@ func isPluralObject(m map[string]any) bool { } return true } + +// IsPlural returns true if this message has any plural forms. +func (m Message) IsPlural() bool { + return m.Zero != "" || m.One != "" || m.Two != "" || + m.Few != "" || m.Many != "" || m.Other != "" +} diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index a39df487..0f8bbf67 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -34,12 +34,6 @@ import ( //go:embed locales/*.json var localeFS embed.FS -// IsPlural returns true if this message has any plural forms. -func (m Message) IsPlural() bool { - return m.Zero != "" || m.One != "" || m.Two != "" || - m.Few != "" || m.Many != "" || m.Other != "" -} - // ForCategory returns the appropriate text for a plural category. // Falls back through the category hierarchy to find a non-empty string. func (m Message) ForCategory(cat PluralCategory) string {