ludic.ui, ludic.i18n: frame_allocs to 0 - a wrap, an ellipsis, a tooltip's lines, a text-shadow's colour and a range's value kept by what made them; pointer events from a ring; inline text joined through the memo; the pool's and the state's lists through ui_kept; parse, memo miss, pool miss, lazy start and template errors declared; the translation cache clears in place
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
629579123a
commit
429e419327
71 changed files with 365 additions and 155 deletions
|
|
@ -10,7 +10,8 @@ function tt_focused(ui_st: mut UiState, scope: UiNode, x: float, y: float) -> Ui
|
|||
if n == null or n.akeys == null or ui_attr_text(n, "title") == "" { return null }
|
||||
return n
|
||||
}
|
||||
function tt_translate(ui_st: UiState, n: UiNode, s: string) -> string {
|
||||
@alloc_ok("on a title's change: tt_track keeps what it made")
|
||||
function tt_translate(ui_st: mut UiState, n: UiNode, s: string) -> string {
|
||||
var at = n
|
||||
while at != null {
|
||||
let say = ui_attr_text(at, "translate")
|
||||
|
|
@ -20,7 +21,7 @@ function tt_translate(ui_st: UiState, n: UiNode, s: string) -> string {
|
|||
}
|
||||
let whole = ui_tr(ui_st, s)
|
||||
if whole != s { return whole }
|
||||
let lines = tt_lines(s)
|
||||
let lines = tt_lines(ui_st, s)
|
||||
if len(lines) < 2 { return whole }
|
||||
var out = ui_tr(ui_st, lines[0])
|
||||
for i in 1 .. len(lines) { out = out + "\n" + ui_tr(ui_st, lines[i]) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue