fix: recipe version diff readability + i18n, tooltip on markdown export

- Version compare used positional (index-by-index) list alignment —
  inserting one ingredient in the middle shifted every subsequent line
  out of alignment, making the whole rest of the list look changed.
  Switch to diffArrays (LCS-based) so insertions/deletions are
  detected properly; adjacent removed+added chunks still get paired
  for word-level diffing so a single edited item doesn't render as a
  full delete+insert.
- Translated "Title"/"Description"/"Ingredients"/"Steps" diff section
  headers, "Version History" sheet title, compare/restore buttons,
  loading/empty states, and the version-detail ingredient/step count
  summary (with proper plural forms).
- formatDate() in version history was hardcoded to "en-US" regardless
  of the app's locale — now uses the session locale.
- ExportMarkdownButton had no hover tooltip (bare title attribute) —
  wrap it in the same Tooltip pattern every other icon button in the
  toolbar uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-09 04:19:33 +02:00
parent 10233b3ef9
commit 1614da38cd
5 changed files with 125 additions and 54 deletions
+13
View File
@@ -113,6 +113,19 @@
"urlImportFetchFailed": "Échec de l'importation de la recette",
"urlImportSaveFailed": "Échec de l'enregistrement de la recette importée",
"urlImportSuccess": "Recette importée ! Vérifiez-la avant de la publier.",
"diffTitleLabel": "Titre",
"diffDescriptionLabel": "Description",
"diffIngredientsLabel": "Ingrédients",
"diffStepsLabel": "Étapes",
"versionHistoryTitle": "Historique des versions",
"versionsLoading": "Chargement des versions...",
"versionsEmpty": "Aucune version pour l'instant. Les versions sont enregistrées automatiquement lorsque vous modifiez cette recette.",
"versionCompare": "Comparer",
"versionCompareWith": "Comparer v{version} avec la version actuelle",
"versionRestore": "Restaurer",
"versionRestored": "Recette restaurée à la version {version}",
"versionDetailLoading": "Chargement...",
"versionDetailSummary": "{ingredients, plural, one {1 ingrédient} other {{ingredients} ingrédients}}, {steps, plural, one {1 étape} other {{steps} étapes}}",
"analyzingPhoto": "Analyse de la photo…",
"pairMealTooltip": "Accorder un plat",
"historyTooltip": "Historique",