- Generate recipes in English (reverted prompt to English-only) - Add TranslateRecipes to OpenAI client (translate.go) — sends compact JSON payload of translatable fields, merges back into original recipes - recommendation/handler.go: translate recipes in-memory before response when lang != "en"; falls back to English on error - dish/repository.go: Create() now returns (dishID, recipeID, err) so callers can upsert dish_translations after saving - menu/handler.go: saveRecipes returns savedRecipeEntry slice with dishID; saveDishTranslations calls TranslateRecipes then UpsertTranslation for each dish when the request locale is not English - savedrecipe/repository.go: updated to ignore dishID from Create() - init.go: wire openaiClient as RecipeTranslator and dishRepository as DishTranslator for menu.NewHandler Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.7 KiB
3.7 KiB