ludic.i18n: a language's lookups kept once read; switching back restores them

i18n_use re-read and re-parsed the .po on every change of language (ev_SettingsChanged, SetLang)
and dropped the old tables for good: the play of 22 minutes left lines_of 650 KB, fs_read_text
409 KB, PoEntry 113 KB and unquote 273 KB unreachable, and three of its @alloc_ok sites were
declared but unbounded. Each language's tables are now filed by index once built (tables.ludic,
I18nTables) and put back by reference; a new probe (i18n_init) or a different file for a code
(lang_add) reads it again.

Test: a language switched back to is its kept tables, not its file read again; a new probe reads
it (9 tests pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 12:21:53 +03:00
parent 28ad6f62ea
commit 1667d7f16e
6 changed files with 112 additions and 1 deletions

View file

@ -3,6 +3,7 @@ module ludic_i18n uses
numbers float
import "ports.ludic"
import "state.ludic"
import "tables.ludic"
import "bytes.ludic"
import "po.ludic"
import "langs.ludic"