Skip to main content

embedded_catalog

Macro embedded_catalog 

macro_rules! embedded_catalog {
    ($vis:vis static $name:ident, [$($locale:literal),+ $(,)?]) => { ... };
    ($vis:vis fn, [$($locale:literal),+ $(,)?]) => { ... };
}
Expand description

Define the calling crate’s EmbeddedCatalog: locales/<locale>.ftl in the crate, en-US as the source, the user’s locale when no host chose one, and source copy pinned in the crate’s own tests.

embedded_catalog!(pub(crate) static STORE_CATALOG, ["en-US", "de-DE"]) defines just the static; embedded_catalog!(pub fn, ["en-US"]) defines CATALOG and the t / t_args lookups the crate’s copy goes through.