🍻 Primera revista a las traducciones por contexto

This commit is contained in:
Manuel Cillero 2023-05-25 20:08:40 +02:00
parent 71b0b0889d
commit 0de26a4737
28 changed files with 307 additions and 187 deletions

View file

@ -14,11 +14,11 @@ impl ModuleTrait for Admin {
}
fn name(&self) -> String {
t("module_name", Locale::From(&LOCALE_ADMIN))
_t("module_name", Locale::From(&LOCALE_ADMIN))
}
fn description(&self) -> Option<String> {
Some(t("module_description", Locale::From(&LOCALE_ADMIN)))
Some(_t("module_description", Locale::From(&LOCALE_ADMIN)))
}
#[rustfmt::skip]

View file

@ -6,7 +6,7 @@ use pagetop_minimal::component::*;
pub async fn summary(request: server::HttpRequest) -> ResultPage<Markup, FatalError> {
let top_menu = MegaMenu::new()
.with_item(MegaMenuItem::label(
t("module_name", Locale::From(&LOCALE_ADMIN)).as_str(),
_t("module_name", Locale::From(&LOCALE_ADMIN)).as_str(),
))
.with_item(MegaMenuItem::link("Opción 2", "https://www.google.es"))
.with_item(MegaMenuItem::link_blank(