- Add NewWithLoader(loader, opts...) for custom storage backends
- Add Option type with WithFallback, WithFormality, WithHandlers,
WithDefaultHandlers, WithMode, WithDebug options
- Update New() and NewWithFS() to accept options
- Add loader field to Service struct
- Remove NewSubject() alias (use S() instead)
- Add tests for new options and NewWithLoader
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add CountString() to return count as string
- Fix FormalityString() to return string instead of Formality type
- Both Int and String getters now available for count field
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename Subject getters from GetX() to idiomatic Go naming:
- GetCount → CountValue
- GetGender → GenderValue
- GetLocation → Location
- GetNoun → NounValue
- GetFormality → FormalityValue
Add comprehensive tests for checks.go and mutate.go functions
that will be useful for future CLDR plural category support.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidate all compose-related tests into a single file for better
organisation. The grammar composition tests that verify intent templates
now live alongside the Subject tests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SetDebug()/Debug() methods for showing key prefixes in output
- Debug mode shows: "[cli.success] Success" instead of "Success"
- Add NewSubject() as alias for S() for readability
- Both T() and C() respect debug mode
Debug mode is useful for:
- Identifying which translation keys are used where
- Verifying correct key usage during development
- QA testing of translation coverage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>