feat(ui): translate="no", and a title of several lines translated whole or line by line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-24 22:03:49 +03:00
parent 7605a0253c
commit 6bd3228990
9 changed files with 76 additions and 1 deletions

View file

@ -24,10 +24,14 @@ function bd_elem(k: UiTpl, e: UiEnv, key: string) -> UiNode {
if k.on_keys[i] == "press" { n.act = k.on_acts[i] }
}
lc_note(key, k.on_keys, k.on_acts, e)
let was_no = tr_no
let say = ui_attr_text(n, "translate")
if say == "no" { tr_no = true } else if say == "yes" { tr_no = false }
bd_kids(k.kids, e, key, n.children)
if k.text != null { el_text(n, ui_tr(ui_eval_text(k.text, e))) }
el_inline(n)
if k.tag == "input" or k.tag == "select" or k.tag == "progress" or k.tag == "meter" { ct_build(n) }
tr_no = was_no
return n
}
function el_kind(n: UiNode, tag: string) -> void {