🎨 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_MENU);
define_locale!("src/module/menu/locales");
define_locale!(LOCALE_MENU, "src/module/menu/locales");
pub struct Menu;
@ -12,10 +12,10 @@ impl ModuleTrait for Menu {
}
fn name(&self) -> String {
l("module_name")
t("module_name", Locale::From(&LOCALE_MENU))
}
fn description(&self) -> Option<String> {
Some(l("module_description"))
Some(t("module_description", Locale::From(&LOCALE_MENU)))
}
}