json-gettext 4.0.0

A library for getting text from JSON usually for internationalization.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[macro_export]
macro_rules! static_json_gettext_build_for_rocket {
    ( $default_key:expr; $( $key:expr => $path:expr ), * $(,)* ) => {
        $crate::JSONGetTextManager::fairing(|| {
            let mut v = Vec::new();

            $(
                v.push(($key, include_str!($crate::manifest_dir_macros::path!($path))));
            )*

            ($default_key ,v)
        })
    };
}