mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
The eight catalogs were static JSON imports, so every server bundle carried the whole eight-locale chunk as a source string and parsed all of them: 32 parsed copies and two 9.7 MB chunk sources in an idle process. The server now reads messages/<locale>.json the first time a translator, the SSR cache or a matcher asks for that locale, and keeps one parsed copy per process on globalThis. allMessages keeps its shape; its entries load on first read. The image copies messages/ next to the server. foldLabel moves to a leaf module, so the client medication map no longer imports the catalog index.