🎨 Nueov enfoque para las funciones de traducción

This commit is contained in:
Manuel Cillero 2023-05-21 21:59:47 +02:00
parent 7691bf4b2f
commit 71b0b0889d
11 changed files with 110 additions and 93 deletions

View file

@ -2,7 +2,7 @@ use pagetop::prelude::*;
define_handle!(MODULE_ADMIN);
define_locale!("src/locales");
define_locale!(LOCALE_ADMIN, "src/locales");
mod summary;
@ -14,11 +14,11 @@ impl ModuleTrait for Admin {
}
fn name(&self) -> String {
l("module_name")
t("module_name", Locale::From(&LOCALE_ADMIN))
}
fn description(&self) -> Option<String> {
Some(l("module_description"))
Some(t("module_description", Locale::From(&LOCALE_ADMIN)))
}
#[rustfmt::skip]