compiler: text keys' follow-up (Master's rulings) - a Key in a template literal's hole is an error (the parser marks each hole's string(), TPL_HOLE; write trf(k"...", ...)), trn takes only a plural key kn"..." and tr / trf refuse one (with or without en.po), and a program with no lang line (a package test) uses key literals unchecked and silently - the warning stays for a lang line whose en.po is missing; rejected/i18n_keys gains key_hole (2) and key_rules (3), key_missing's plural moves to trn; LANGUAGE.md and the changeset say so; reseeded, bootstrap-cfree fixpoint holds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
66b8e51026
commit
9f9ac4a7ce
13 changed files with 72839 additions and 72164 deletions
12
examples/rejected/i18n_keys/key_rules.ludic
Normal file
12
examples/rejected/i18n_keys/key_rules.ludic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# phase 26: trn wants a plural key kn"...", and tr / trf refuse one
|
||||
program KeyRules {
|
||||
function tr(key: Key) -> string { return string(key) }
|
||||
function trf(key: Key, a: string) -> string { return string(key) + a }
|
||||
function trn(key: Key, n: int) -> string { return string(key) }
|
||||
entry {
|
||||
print(trn(k"hud.day", 2))
|
||||
print(trf(kn"catch.count", "1"))
|
||||
print(tr(kn"catch.count"))
|
||||
print(tr(k"pause.resume"))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue