feat: add new meals#879
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the “repas” (meal) equivalents dataset by adding new meal types and aligning values/labels across the equivalents sources (JSON + CSV), along with related locale strings and assets.
Changes:
- Update existing meal equivalents’ values and add new meal equivalents (porc, veau, lieu noir, thon) across
values.json,repas.ts, andpublic/equivalents.csv. - Add/extend locale content (FR/EN/ES) for meal descriptions and CO₂e wording.
- Update UI download labels and add new icons/meta images for new/updated equivalents.
Reviewed changes
Copilot reviewed 10 out of 160 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/Equivalent/values.json | Updates meal equivalents values and adds new meal slugs/translations. |
| src/providers/locales/fr.json | Updates CO₂e wording + adds meal description strings (but introduces a rich placeholder bug). |
| src/providers/locales/en.json | Adds meal description strings and minor punctuation adjustment. |
| src/providers/locales/es.json | Adds meal description strings and minor punctuation adjustment. |
| src/data/categories/repas.ts | Updates meal totals/sources and adds new meal entries. |
| src/components/outils/equivalents/EquivalentPage.tsx | Updates the displayed size for the CSV download label. |
| src/components/outils/Outils.tsx | Updates the displayed size for the CSV download label. |
| src/components/home/Equivalents.tsx | Updates the displayed size for the CSV download label. |
| public/meta/livraisondomicile2kg-en.png | Adds/updates an EN meta image asset. |
| public/meta/livraisondomicile15kg-en.png | Adds/updates an EN meta image asset. |
| public/icons/repasavecduveau.svg | Adds an icon for the veal meal equivalent. |
| public/icons/repasavecduthon.svg | Adds an icon for the tuna meal equivalent. |
| public/icons/repasavecduporc.svg | Adds an icon for the pork meal equivalent. |
| public/icons/repasavecdulieunoir.svg | Adds an icon for the pollock meal equivalent. |
| public/equivalents.csv | Regenerates equivalents list with updated meal rows and additional non-meal value changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Chaudière à bûches,5.699613154471493,Chauffage,chaudiereabois,https://impactco2.fr/outils/chauffage/chaudiereabois | ||
| Chaudière à gaz,17.837078297821858,Chauffage,chauffagegaz,https://impactco2.fr/outils/chauffage/chauffagegaz | ||
| Chaudière à granulés,5.976712890838114,Chauffage,chaudiereagranule,https://impactco2.fr/outils/chauffage/chaudiereagranule | ||
| Chaudière à granulés,3.964948281371474,Chauffage,chaudiereagranule,https://impactco2.fr/outils/chauffage/chaudiereagranule | ||
| Chaudière au fioul,34.97117557474335,Chauffage,chauffagefioul,https://impactco2.fr/outils/chauffage/chauffagefioul | ||
| Chaudière ou convecteur électrique,2.40969157390629,Chauffage,chauffageelectrique,https://impactco2.fr/outils/chauffage/chauffageelectrique | ||
| Chaudière ou convecteur électrique,2.144625500776598,Chauffage,chauffageelectrique,https://impactco2.fr/outils/chauffage/chauffageelectrique |
There was a problem hiding this comment.
Le PR est titré « add new meals », mais ce fichier inclut aussi des mises à jour de valeurs et libellés hors repas (chauffage, livraison, numerique, etc.). Si ces changements sont intentionnels (fichier régénéré), il faudrait l’indiquer clairement dans le titre/description ou scinder en PR séparés pour faciliter la revue et le suivi.
| "roundTrip": "Aller / retour", | ||
| "header": "Calculer l’impact carbone de votre trajet en <co2e>CO₂e</co2e> et <parpersonne>par personne</parpersonne>", | ||
| "header": "Calculer l’impact carbone de votre trajet en <co₂e>CO₂e</co₂e> et <parpersonne>par personne</parpersonne>", | ||
| "start": "Départ", | ||
| "end": "Arrivée", |
There was a problem hiding this comment.
Le placeholder rich-text a été renommé en <co₂e>…</co₂e>, mais le code (next-intl t.rich) injecte un composant via la clé co2e (sans caractère "₂"). Du coup, le bouton CO₂e ne sera plus rendu et/ou la string peut être affichée avec des balises brutes. Garder le tag <co2e>…</co2e> et uniquement remplacer le texte affiché par CO₂e si besoin.
| "distance": { | ||
| "header": "Calculer l’impact carbone de votre trajet en <co2e>CO₂e</co2e> et <parpersonne>par personne</parpersonne>" | ||
| "header": "Calculer l’impact carbone de votre trajet en <co₂e>CO₂e</co₂e> et <parpersonne>par personne</parpersonne>" | ||
| }, |
There was a problem hiding this comment.
Même problème de placeholder rich-text qu’en transport.itineraire.header: ici transport.distance.header utilise <co₂e>, mais t.rich s’attend à une balise <co2e> pour injecter le composant (voir DistanceSimulator.tsx). À corriger pour éviter la perte du lien/bouton et des tags affichés.
No description provided.