You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This crate internally use a macro called declare_locales! which permit the declaration of translations directly in the code,
this macro was developed for the only need of unit tests and doctests, as those can't have configuration files (they probably could, but that is NOT convenient).
For now I'm not confortable "stabilizing" it, as some arguments are added when needed such as path wich let you set the path to the leptos_i18n crate, this is usefull for unit tests so it can be set as path: crate, or the interpolate_display argument to allow the output of the interpolate_display feature even if it is not enabled. I want the freedom to modify it as much as I want to accomodate tests.
But if some people are interested in using this macro let me know here, I would consider making it public.
For now if you want/need to use it, it is available with #[doc(hidden)] at leptos_i18n::declare_locales. But remember, it is still a "private"/internal item, and no guarantees are made with it. If you want to see some example of it's usage, you can check the macro.rs module and the doctests there.
The text was updated successfully, but these errors were encountered:
This crate internally use a macro called
declare_locales!
which permit the declaration of translations directly in the code,this macro was developed for the only need of unit tests and doctests, as those can't have configuration files (they probably could, but that is NOT convenient).
Basically instead of
you can have
and will produce the expected
i18n
module.For now I'm not confortable "stabilizing" it, as some arguments are added when needed such as
path
wich let you set the path to theleptos_i18n
crate, this is usefull for unit tests so it can be set aspath: crate
, or theinterpolate_display
argument to allow the output of theinterpolate_display
feature even if it is not enabled. I want the freedom to modify it as much as I want to accomodate tests.But if some people are interested in using this macro let me know here, I would consider making it public.
For now if you want/need to use it, it is available with
#[doc(hidden)]
atleptos_i18n::declare_locales
. But remember, it is still a "private"/internal item, and no guarantees are made with it. If you want to see some example of it's usage, you can check the macro.rs module and the doctests there.The text was updated successfully, but these errors were encountered: