Files
Fred 0e26f12426 fix(locale): protect translation catalog from concurrent map writes
getTranslationDict lazily populates the package-level defaultCatalog
map and runs on concurrent request goroutines via template functions,
flash messages, and error translation. Two concurrent requests for
languages not yet cached triggered Go's fatal "concurrent map writes"
and killed the daemon.

Guard the catalog with a sync.RWMutex using double-checked locking so
each language is loaded once. A failed load is no longer cached as an
empty dictionary, so unknown languages now return the error on every
call; both callers treat an error and an empty dictionary identically,
so rendered output is unchanged.

Add a regression test exercising concurrent lazy population; it fails
under the race detector on the previous implementation.
2026-07-21 20:54:36 -07:00
..
2026-06-16 14:07:54 -07:00
2026-05-23 18:07:11 -07:00
2026-05-23 18:07:11 -07:00