restructuring move translations to toplevel

This commit is contained in:
Franz Dietrich 2021-05-25 20:13:56 +02:00
parent 5e03b4385f
commit e5d8e6c62f
6 changed files with 3 additions and 4 deletions

View File

View File

@ -81,7 +81,7 @@ impl Lang {
pub const fn ftl_messages(self) -> &'static str { pub const fn ftl_messages(self) -> &'static str {
macro_rules! include_ftl_messages { macro_rules! include_ftl_messages {
( $lang_id:literal ) => { ( $lang_id:literal ) => {
include_str!(concat!("../locales/", $lang_id, "/main.ftl")) include_str!(concat!("../../locales/", $lang_id, "/main.ftl"))
}; };
} }
match self { match self {

View File

@ -19,7 +19,7 @@ fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
log!(url); log!(url);
let lang = I18n::new(Lang::DeDE); let lang = I18n::new(Lang::EnUS);
Model { Model {
index: 0, index: 0,

View File

@ -58,8 +58,7 @@ pub fn navigation(i18n: &I18n, base_url: &Url, user: &Option<User>) -> Node<Msg>
li![div![welcome]], li![div![welcome]],
// The logout button // The logout button
li![a![ li![a![
attrs! {At::Href => "/admin/logout"}, attrs! {At::Href => "/admin/logout/"},
ev(Ev::Click, |_| Msg::NoMessage),
t("logout"), t("logout"),
]] ]]
] ]