ludic.i18n: a key's text glued into an English line is made where it sits - L decodes each marked name inside a line that is not a key of its own ("A {1}, {2} cm." given a name that is a key, name + "\n" + blurb), in the language in use, then the line takes its old English lookup; kept in the keyed cache. Interim until every such line is a key (26.9). keys_test covers the stop at a sentence's full stop, a key at the head with words after, a mixed argument in a key's hole, and a key whole left alone.

Since the data's text became keys (26.4), a game's English patterns that take a table's name (Notify, txt_pat, a concatenation) drew the raw mark and key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 00:50:53 +03:00
parent a3377215e9
commit 96c6e27d98
5 changed files with 72 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# translate.ludic - what the game draws, in the language in use: a key (keyed_render.ludic); else, the old
# English form, exact, else a pattern, else padding taken off, else a paragraph a sentence at a time
export function L(i18n_st: mut I18nState, s: string) -> string {
if kx_mixed(s) { return kx_line(i18n_st, s) }
if i18n_is_key(s) { return keyed(i18n_st, s) }
if not i18n_st.on { return s }
let ci = Dict.get_or(i18n_st.cache, s, -1)