cli/pkg/i18n
Snider b04b2a70dc feat(i18n): implement formality-based message selection
Add support for formal/informal translation variants using suffix convention:
- key._formal for formal address (Sie, vous, usted)
- key._informal for informal address (du, tu, tú)

Formality priority: Subject.Formal() > Service.SetFormality() > neutral

Example locale file:
  "greeting": "Hello",
  "greeting._formal": "Good morning, sir",
  "greeting._informal": "Hey there"

Usage:
  svc.SetFormality(FormalityFormal)
  svc.T("greeting")  // "Good morning, sir"

  svc.T("greeting", S("user", name).Informal())  // "Hey there"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:13:12 +00:00
..
locales feat(i18n): add localized number formatting helpers 2026-01-30 14:39:15 +00:00
actions.go refactor(i18n): extract action handlers to actions.go 2026-01-30 17:04:21 +00:00
checks.go refactor(i18n): rename check.go to checks.go, move IsPlural 2026-01-30 16:54:30 +00:00
compose.go refactor(i18n): remove C() and move intents to test-only 2026-01-30 16:50:08 +00:00
compose_data_test.go refactor(i18n): rename intents_test.go to compose_data_test.go 2026-01-30 16:52:30 +00:00
compose_test.go refactor(i18n): merge compose_intents_test.go into compose_test.go 2026-01-30 16:57:47 +00:00
debug.go refactor(i18n): extract debug functionality to debug.go 2026-01-30 13:31:52 +00:00
grammar.go fix(i18n): multi-syllable verb doubling and template caching 2026-01-30 17:10:22 +00:00
grammar_test.go feat(i18n): implement semantic i18n system with grammar engine 2026-01-30 12:29:44 +00:00
i18n.go fix(i18n): multi-syllable verb doubling and template caching 2026-01-30 17:10:22 +00:00
i18n_test.go feat(i18n): implement formality-based message selection 2026-01-30 17:13:12 +00:00
interface.go refactor(i18n): move ForCategory to interface.go 2026-01-30 17:00:05 +00:00
interface_test.go refactor(i18n): remove C() and move intents to test-only 2026-01-30 16:50:08 +00:00
keys.go feat(i18n): add compile-time key validation tool 2026-01-30 13:18:58 +00:00
language.go refactor(i18n): consolidate interfaces in interface.go 2026-01-30 14:57:57 +00:00
language_test.go feat(i18n): add Phase 4 extended language support 2026-01-30 12:55:41 +00:00
localise.go refactor(i18n): extract locale functions to localise.go 2026-01-30 15:02:20 +00:00
mode.go refactor(i18n): extract action handlers to actions.go 2026-01-30 17:04:21 +00:00
mode_test.go refactor(i18n): remove C() and move intents to test-only 2026-01-30 16:50:08 +00:00
mutate.go refactor(i18n): extract JSON flattening to mutate.go 2026-01-30 14:54:03 +00:00
numbers.go feat(i18n): add localized number formatting helpers 2026-01-30 14:39:15 +00:00
numbers_test.go feat(i18n): add localized number formatting helpers 2026-01-30 14:39:15 +00:00
service.go feat(i18n): implement formality-based message selection 2026-01-30 17:13:12 +00:00
time.go feat(i18n): add localized time formatting helpers 2026-01-30 14:44:42 +00:00
time_test.go feat(i18n): add localized time formatting helpers 2026-01-30 14:44:42 +00:00
transform.go refactor(i18n): extract type conversions to transform.go 2026-01-30 14:46:49 +00:00