reglas: el panel explica que se incumple y como arreglarlo; stats por etiqueta

- RuleViolation.reasons: el motor devuelve ahora QUE regla rompe cada
  asignacion (repetido en la semana, maximo por semana superado, no
  consecutivo, no mismo dia, solo comida/cena, solo entre semana o fin
  de semana) con su etiqueta y limite
- Panel de avisos: bloque con cada regla rota en lenguaje claro + una
  sugerencia de que hacer, y boton nuevo "Cambiar plato" que abre el
  selector de ese hueco (antes solo se podia quitar o ignorar)
- Estadisticas: matriz "Etiquetas por tipo de comida" (p.ej. cuantas
  cenas son de pescado) y "Platos por etiqueta" del catalogo
- Tests: 4 casos de las razones de incumplimiento; harness que renderiza
  las secciones nuevas de stats a /tmp/stats_render.png
- Strings en 6 idiomas

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
This commit is contained in:
alexandrev-tibco
2026-09-10 21:06:42 +02:00
parent 9406c3f8e7
commit 718eef16bf
14 changed files with 545 additions and 11 deletions
@@ -445,3 +445,18 @@
"shopping_at_home_section" = "Schon zu Hause";
"premium_privacy_link" = "Datenschutzrichtlinie";
"premium_terms_link" = "Nutzungsbedingungen (EULA)";
"violation_reason_repeated" = "Dieses Gericht ist diese Woche schon eingeplant";
"violation_reason_max_per_week" = "Maximal %1$@: %2$d pro Woche — überschritten";
"violation_reason_no_consecutive" = "%@ darf nicht an aufeinanderfolgenden Tagen wiederholt werden";
"violation_reason_no_same_day" = "%@ ist an diesem Tag schon in einer anderen Mahlzeit";
"violation_reason_meal_only" = "%1$@ ist nur bei %2$@ erlaubt";
"violation_reason_day_scope" = "%1$@ ist nur %2$@ erlaubt";
"violation_scope_weekdays" = "unter der Woche";
"violation_scope_weekend" = "am Wochenende";
"violation_suggestion_repeated" = "Tausche es gegen ein anderes Gericht";
"violation_suggestion_swap" = "Tausche es gegen ein Gericht mit anderem Tag";
"violation_suggestion_move" = "Verschiebe es auf einen erlaubten Tag oder eine erlaubte Mahlzeit";
"violation_suggestion_generic" = "Gericht ändern oder Hinweis ignorieren";
"violations_replace" = "Gericht ändern";
"stats_tag_by_meal_title" = "Tags nach Mahlzeit";
"stats_dishes_per_tag_title" = "Gerichte pro Tag";