compiler: text keys (phase 26.2) - k"pause.resume" / kn"catch.count" of the builtin type Key (not a string, and no string one; == compares), its run-time value the key after a marker byte (1, or 2 for a plural); package.ludic's lang "assets/lang" en and a gettext .po reader; every key literal checked against en.po (a kn"" one wants a msgid_plural), trf / trn and a template's t('key', ...) against the English's holes, a component's template words and a @Text row's English as "English left" (warnings, english_left in ludic deps), a @Text Key field a compiled row leaves out filled with its derived key <registry>.<row>.<field> (or @TextKey's prefix; maps.<map>.<table>.<row>.<field> for a @PerMap row, checked), one English under several undescribed keys warned at en.po's line; the schema's "lang" (keys and their sites, unused, undescribed, split, and every other language's missing / fuzzy / extra); k"" in .lres data, @PerMap rows included (lres_key); ludic-fmt keeps a key literal whole; reseeded, bootstrap-cfree fixpoint holds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
82c652ca31
commit
cc1ea0f4ae
28 changed files with 139268 additions and 109746 deletions
|
|
@ -220,6 +220,7 @@ function pmk_map(md: pointer) -> void {
|
|||
}
|
||||
pmk_refs()
|
||||
pmk_game_assets()
|
||||
i18n_permap_rows(md) # i18n.ludic: its text keys and English left
|
||||
}
|
||||
# a key written twice in one file
|
||||
function pmk_dups() -> void {
|
||||
|
|
@ -321,6 +322,7 @@ function pmk_rec(rec: Node, comp: Node, row: bool) -> void {
|
|||
function pmk_desc(e: Node) -> pointer {
|
||||
if e.kind == E_INT or (e.kind == E_UN and e.a != null and e.a.kind == E_INT) { return "an int" }
|
||||
if e.kind == E_FLOAT or (e.kind == E_UN and e.a != null and e.a.kind == E_FLOAT) { return "a float" }
|
||||
if i18n_is_key(e) { return "a key" }
|
||||
if e.kind == E_STR { return "a string" }
|
||||
if e.kind == E_BOOL { return "true or false" }
|
||||
if e.kind == E_ID { return `the name {e.s}` }
|
||||
|
|
@ -376,8 +378,12 @@ function pmk_value(e: Node, f: Node, ty: pointer, at: Node) -> void {
|
|||
if e.kind != E_BOOL { pmk_want(e, f, "true or false") }
|
||||
return
|
||||
}
|
||||
if k == PM_STR and i18n_is_key_ty(ty) {
|
||||
if not i18n_is_key(e) { pmk_want(e, f, "a key k\"...\"") }
|
||||
return
|
||||
}
|
||||
if k == PM_STR {
|
||||
if e.kind != E_STR { pmk_want(e, f, "a \"string\""); return }
|
||||
if e.kind != E_STR or i18n_is_key(e) { pmk_want(e, f, "a \"string\""); return }
|
||||
pmk_attrs_str(e, f)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue