Page:
Migration-from-core-go
No results
2
Migration-from-core-go
Virgil edited this page 2026-02-19 14:56:39 +00:00
Migration from core/go pkg/i18n
Context
core/go/pkg/i18n was the original i18n implementation bundled inside the monolith. It has been partially extracted to go-i18n but the extraction is incomplete.
What Migrates vs What Stays
Migrates to go-i18n (already done)
- Grammar primitives (PastTense, Gerund, Pluralize, Article)
- Irregular verb/noun databases
- Handler chain pattern (i18n.* namespace magic)
- Service + message lookup
- Subject builder
- Number/time formatting
- Plural categories (CLDR)
- RTL/LTR support
Stays in core/go (to be removed)
- 34 locale files — bad data, needs full rework, NOT migrated
- CLI integration wrapper — belongs in core/cli, not go-i18n
- Completeness validation tool — CLI-specific, not library concern
Key Principle
go-i18n is a grammar engine, not a translation file manager.
Consumers (core/cli, apps) bring their own translation files. go-i18n provides:
- Grammar primitives for composing grammatically correct text
- Reversal engine for extracting grammar structure
- GrammarImprint for privacy-preserving classification
- Training data multiplier for augmentation
It does NOT ship, manage, or validate consumer translation files.
Steps to Complete Migration
core/cliimportsforge.lthn.ai/core/go-i18ninstead ofpkg/i18ncore/climanages its own locale files (fresh, not copied from bad data)core/goremovespkg/i18n/entirelycore/gogo.work includes go-i18n for local dev