v0.5.1
Highlights
- Localization support (en + zh-TW + zh-CN) —
Accept-Languageand?locale=resolve to one of three catalogs that flow through render and service layers; CJK rune-width-aware padding keeps zh rows aligned.X-Imagelet-Localeechoes the resolved locale andVary: Accept-Languageis added so caches segment correctly. LRU bumped 256 → 1024 to absorb the per-locale fan-out.i18n.Forreturns*Catalogto keep the per-render hot path allocation-free.
Other changes
- Outbound HTTP egress: single
safehttp.DefaultUserAgent(was 7 hand-typed copies, drifted between/0.2and/0.3); JSON decode paths drain the response body so connections re-enter the keep-alive pool. - Render:
parseSVGpropagates decoder errors instead of returning a partially-populated doc; PNG encoder defaults toDefaultCompressionfor a 3-5× CPU win on the OG card path. renderSymboluseserrors.Is(err, twse.ErrUnavailable)at all six fetch sites — robust to provider%wwrapping.- Operator log messages converted to English so on-call engineers can grep them locale-independent.
Container image
ghcr.io/cmj0121/imagelet:0.5.1