Translation (WIP)
This commit is contained in:
parent
9b0fcec5e2
commit
e9873c1943
29 changed files with 586 additions and 285 deletions
|
|
@ -9,6 +9,7 @@ use serde::Deserialize;
|
|||
use crate::{
|
||||
data::{db, model},
|
||||
html_templates::*,
|
||||
translation,
|
||||
};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
@ -21,6 +22,7 @@ pub async fn recipes_list_fragments(
|
|||
State(connection): State<db::Connection>,
|
||||
current_recipe: Query<CurrentRecipeId>,
|
||||
Extension(user): Extension<Option<model::User>>,
|
||||
Extension(tr): Extension<translation::Tr>,
|
||||
) -> Result<impl IntoResponse> {
|
||||
let recipes = Recipes {
|
||||
published: connection.get_all_published_recipe_titles().await?,
|
||||
|
|
@ -33,5 +35,5 @@ pub async fn recipes_list_fragments(
|
|||
},
|
||||
current_id: current_recipe.current_recipe_id,
|
||||
};
|
||||
Ok(RecipesListFragmentTemplate { user, recipes })
|
||||
Ok(RecipesListFragmentTemplate { user, tr, recipes })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue