1f16d1c5c9
- Add embedded translations schema to Recipe model with English support - Create DeepL translation service with batch translation and change detection - Build translation approval UI with side-by-side editing for all recipe fields - Integrate translation workflow into add/edit pages with field comparison - Create complete English recipe routes at /recipes/* mirroring German structure - Add language switcher component with hreflang SEO tags - Support image loading from German short_name for English recipes - Add English API endpoints for all recipe filters (category, tag, icon, season) - Include layout with English navigation header for all recipe subroutes
20 lines
600 B
TypeScript
20 lines
600 B
TypeScript
import type { PageServerLoad } from "./$types";
|
|
import { getUserFavorites, addFavoriteStatusToRecipes } from "$lib/server/favorites";
|
|
|
|
export const load: PageServerLoad = async ({ fetch, locals, params }) => {
|
|
const res_season = await fetch(`/api/recipes/items/in_season/` + params.month);
|
|
const item_season = await res_season.json();
|
|
|
|
// Get user favorites and session
|
|
const [userFavorites, session] = await Promise.all([
|
|
getUserFavorites(fetch, locals),
|
|
locals.auth()
|
|
]);
|
|
|
|
return {
|
|
month: params.month,
|
|
season: addFavoriteStatusToRecipes(item_season, userFavorites),
|
|
session
|
|
};
|
|
};
|