💥 Better names for main macros

This commit is contained in:
Manuel Cillero 2023-07-15 11:34:28 +02:00
parent eee481cfcb
commit 6df57a0c12
44 changed files with 146 additions and 140 deletions

View file

@ -1,8 +1,8 @@
use pagetop::prelude::*;
use_handle!(MODULE_ADMIN);
create_handle!(MODULE_ADMIN);
use_locale!(LOCALE_ADMIN);
static_locales!(LOCALES_ADMIN);
mod summary;
@ -14,11 +14,11 @@ impl ModuleTrait for Admin {
}
fn name(&self) -> L10n {
L10n::t("module_name", &LOCALE_ADMIN)
L10n::t("module_name", &LOCALES_ADMIN)
}
fn description(&self) -> L10n {
L10n::t("module_description", &LOCALE_ADMIN)
L10n::t("module_description", &LOCALES_ADMIN)
}
#[rustfmt::skip]

View file

@ -1,4 +1,4 @@
use crate::LOCALE_ADMIN;
use crate::LOCALES_ADMIN;
use pagetop::prelude::*;
use pagetop_megamenu::component::{MegaMenu, MegaMenuItem};
@ -6,7 +6,7 @@ use pagetop_minimal::component::*;
pub async fn summary(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
let top_menu = MegaMenu::new()
.with_item(MegaMenuItem::label(L10n::t("module_name", &LOCALE_ADMIN)))
.with_item(MegaMenuItem::label(L10n::t("module_name", &LOCALES_ADMIN)))
.with_item(MegaMenuItem::link(
L10n::n("Opción 2"),
"https://www.google.es",