🚧 Renombra "define_locale!()" por "use_locale!()"
This commit is contained in:
parent
db93cc3f14
commit
7fb30f9ee4
9 changed files with 10 additions and 10 deletions
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use_handle!(MODULE_ADMIN);
|
||||
|
||||
define_locale!(LOCALE_ADMIN, "src/locale");
|
||||
use_locale!(LOCALE_ADMIN, "src/locale");
|
||||
|
||||
mod summary;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use_handle!(THEME_BOOTSIER);
|
||||
|
||||
define_locale!(LOCALE_BOOTSIER, "src/locale");
|
||||
use_locale!(LOCALE_BOOTSIER, "src/locale");
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/bootsier.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use pagetop_minimal::component::*;
|
|||
|
||||
use_handle!(MODULE_DEMOHOME);
|
||||
|
||||
define_locale!(LOCALE_DEMOHOME, "src/locale");
|
||||
use_locale!(LOCALE_DEMOHOME, "src/locale");
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/homedemo.rs"));
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use_handle!(MODULE_MENU);
|
||||
|
||||
define_locale!(LOCALE_MENU, "src/module/menu/locales");
|
||||
use_locale!(LOCALE_MENU, "src/module/menu/locales");
|
||||
|
||||
pub struct Menu;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use pagetop::prelude::*;
|
|||
|
||||
use_handle!(MODULE_NODE);
|
||||
|
||||
define_locale!(LOCALE_NODE, "src/locale");
|
||||
use_locale!(LOCALE_NODE, "src/locale");
|
||||
|
||||
//mod entity;
|
||||
mod migration;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use pagetop_minimal::component::*;
|
|||
|
||||
use_handle!(MODULE_USER);
|
||||
|
||||
define_locale!(LOCALE_USER, "src/locale");
|
||||
use_locale!(LOCALE_USER, "src/locale");
|
||||
|
||||
mod migration;
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ pub type HashMapResources = std::collections::HashMap<&'static str, StaticResour
|
|||
|
||||
pub type Handle = u64;
|
||||
|
||||
define_locale!(LOCALE_PAGETOP, "src/locale");
|
||||
use_locale!(LOCALE_PAGETOP, "src/locale");
|
||||
|
||||
// *************************************************************************************************
|
||||
// APIs PÚBLICAS.
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@
|
|||
//! # Cómo aplicar la localización en tu código
|
||||
//!
|
||||
//! Una vez hayas creado tu directorio de recursos FTL usa la macro
|
||||
//! [`define_locale!`](crate::define_locale) para integrarlos en tu módulo o aplicación.
|
||||
//! [`use_locale!`](crate::use_locale) para integrarlos en tu módulo o aplicación.
|
||||
//!
|
||||
//! ```
|
||||
//! use pagetop::prelude::*;
|
||||
//!
|
||||
//! define_locale!(LOCALE_SAMPLE, "src/locale");
|
||||
//! use_locale!(LOCALE_SAMPLE, "src/locale");
|
||||
//! ```
|
||||
//! Y usa el componente [L10n](crate::base::component::L10n) para incluir en las respuestas a
|
||||
//! peticiones web, textos y contenidos opcionalmente traducibles según el contexto de renderizado.
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ macro_rules! use_handle {
|
|||
|
||||
#[macro_export]
|
||||
/// Define un conjunto de elementos de localización y funciones locales de traducción.
|
||||
macro_rules! define_locale {
|
||||
macro_rules! use_locale {
|
||||
( $LOCALES:ident, $dir_locales:literal $(, $core_locales:literal)? ) => {
|
||||
use $crate::locale::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue