🐛 (locale): Corrige escapado de L10n::using()

`L10n::using()` insertaba el texto de `L10n::n()` sin escapar,
tratándolo igual que una traducción de confianza (`l()`/`t()`); ahora se
escapa como cualquier otro valor interpolado con `html!`.

Además, `using()` no debe usarse en valores de atributo. Su marcado de
confianza para `l()`/`t()` podría romper el delimitador si la traducción
contuviera una comilla. Se sustituye por `lookup()`
This commit is contained in:
Manuel Cillero 2026-08-12 14:28:47 +02:00
parent 6bea4a5793
commit 3198b74399
13 changed files with 96 additions and 26 deletions

View file

@ -123,7 +123,7 @@ impl Component for Checkbox {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}

View file

@ -238,7 +238,7 @@ impl Component for Field {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}

View file

@ -89,7 +89,7 @@ impl Component for Number {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}

View file

@ -150,7 +150,7 @@ impl Component for Field {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}

View file

@ -246,7 +246,7 @@ impl Component for Field {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}
@ -277,7 +277,7 @@ impl Component for Field {
}
Entry::Group(group) => {
optgroup
label=(group.label().using(cx))
label=[group.label().lookup(cx)]
disabled[*group.disabled()]
{
@for opt in group.items() {

View file

@ -99,7 +99,7 @@ impl Component for Textarea {
@if *self.required() {
span
class="form-required"
title=(L10n::l("field_required").using(cx))
title=[L10n::l("field_required").lookup(cx)]
{
"*"
}