From 520a5188baaba76aeb5672b14d007cda6f66f4d7 Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 10:41:08 +0000 Subject: [PATCH] feat(i18n): add core plural category alias Co-Authored-By: Virgil --- core_service.go | 5 +++++ hooks_test.go | 1 + 2 files changed, 6 insertions(+) diff --git a/core_service.go b/core_service.go index b3fdaef..8be2a7c 100644 --- a/core_service.go +++ b/core_service.go @@ -322,3 +322,8 @@ func (s *CoreService) IsRTL() bool { func (s *CoreService) PluralCategory(n int) PluralCategory { return s.svc.PluralCategory(n) } + +// CurrentPluralCategory returns the plural category for the wrapped service language. +func (s *CoreService) CurrentPluralCategory(n int) PluralCategory { + return s.PluralCategory(n) +} diff --git a/hooks_test.go b/hooks_test.go index 76d4a06..1a37f10 100644 --- a/hooks_test.go +++ b/hooks_test.go @@ -355,6 +355,7 @@ func TestCoreService_DelegatesToWrappedService(t *testing.T) { assert.Equal(t, svc.Direction(), coreSvc.CurrentDirection()) assert.Equal(t, svc.IsRTL(), coreSvc.IsRTL()) assert.Equal(t, svc.PluralCategory(2), coreSvc.PluralCategory(2)) + assert.Equal(t, svc.PluralCategory(2), coreSvc.CurrentPluralCategory(2)) assert.Equal(t, svc.Mode(), coreSvc.CurrentMode()) assert.Equal(t, svc.Language(), coreSvc.CurrentLanguage()) assert.Equal(t, svc.Fallback(), coreSvc.CurrentFallback()) -- 2.45.3