From bb6aa034e425d875d5f4decf7c18b8a7df4da5ca Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 30 Jan 2026 16:54:30 +0000 Subject: [PATCH] refactor(i18n): rename check.go to checks.go, move IsPlural MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename check.go → checks.go (fix typo) - Move Message.IsPlural() from i18n.go to checks.go Co-Authored-By: Claude Opus 4.5 --- pkg/i18n/{check.go => checks.go} | 6 ++++++ pkg/i18n/i18n.go | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) rename pkg/i18n/{check.go => checks.go} (89%) 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 8054ef4..9ea5b1e 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 a39df48..0f8bbf6 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 {