🚧 Renombra "define_locale!()" por "use_locale!()"

This commit is contained in:
Manuel Cillero 2023-06-23 08:33:15 +02:00
parent db93cc3f14
commit 7fb30f9ee4
9 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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"));

View file

@ -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"));

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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.

View file

@ -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.

View file

@ -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::*;