Commit graph

3 commits

Author SHA1 Message Date
Virgil
43cf530b9d fix(i18n): honor default translation context count
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-02 13:41:48 +00:00
Virgil
9aca9b443f fix(i18n): coerce string counts and numeric args
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:01:33 +00:00
Claude
32a55f5d35
test(i18n): add tests for 8 uncovered files, coverage 69.9% -> 86.6%
Add dedicated test files for compose.go, context.go, debug.go, hooks.go,
i18n.go, localise.go, time.go, and transform.go. Uses testify
assert/require with table-driven tests and Good/Bad/Ugly naming.

Key coverage improvements:
- transform.go: toInt/toInt64/toFloat64 18.8% -> 100%
- time.go: TimeAgo/FormatAgo 0% -> 100%/87.5%
- compose.go: newTemplateData/SetFormality/IsInformal 0% -> 100%
- context.go: all functions now 100%
- debug.go: package-level SetDebug 0% -> 100%
- hooks.go: RegisterLocales 0% -> 100%
- i18n.go: T/Raw/N/SetMode/AddHandler/PrependHandler all covered

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 02:09:08 +00:00