diff --git a/html/images/attributes/src/green-score-a.svg b/html/images/attributes/src/green-score-a.svg index 2288ae674ef55..29aafc9f3ad30 100644 --- a/html/images/attributes/src/green-score-a.svg +++ b/html/images/attributes/src/green-score-a.svg @@ -21,9 +21,9 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:zoom="2.7356194" - inkscape:cx="193.00931" - inkscape:cy="35.458149" - inkscape:window-width="2122" + inkscape:cx="176.74242" + inkscape:cy="64.701983" + inkscape:window-width="1924" inkscape:window-height="991" inkscape:window-x="26" inkscape:window-y="23" @@ -923,7 +923,7 @@ style="stroke-width:1.636" /> + transform="matrix(0.92730244,0,0,0.92730244,99.997371,-97.488025)"> + + - - - + id="g13" + transform="matrix(0.92730244,0,0,0.92730244,99.997371,-97.488512)"> + id="path4" /> + id="path5" /> + id="path6" /> + id="path7" /> - - + id="path8" /> + stroke-width="2" + id="rect8-9" /> + stroke-width="2" + id="rect9-4" /> + stroke-width="2" + id="rect10-7" /> + stroke-width="2" + id="rect11-8" /> + stroke-width="2" + id="rect12" /> + stroke-width="2" + id="rect13" /> + - - diff --git a/html/images/attributes/src/green-score-f.svg b/html/images/attributes/src/green-score-f.svg index b056a42041489..b82b31aab8f64 100644 --- a/html/images/attributes/src/green-score-f.svg +++ b/html/images/attributes/src/green-score-f.svg @@ -22,26 +22,15 @@ inkscape:deskcolor="#d1d1d1" inkscape:zoom="1.95" inkscape:cx="82.564103" - inkscape:cy="64.615385" + inkscape:cy="-17.435897" inkscape:window-width="2560" inkscape:window-height="1403" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="svg2032" /> { - en => "eco-score-the-environmental-impact-of-food-products", - de => "eco-score-die-umweltauswirkungen-von-lebensmitteln", - es => "eco-score-el-impacto-medioambiental-de-los-productos-alimenticios", - fr => "eco-score-l-impact-environnemental-des-produits-alimentaires", - it => "eco-score-impatto-ambientale-dei-prodotti-alimentari", - nl => "eco-score-de-milieu-impact-van-voedingsproducten", - pt => "eco-score-o-impacto-ambiental-dos-produtos-alimentares", - }, -); - -sub url_for_text ($textid) { - - # remove starting / if passed - $textid =~ s/^\///; - - if (not defined $urls_for_texts{$textid}) { - return "/" . $textid; - } - elsif (defined $urls_for_texts{$textid}{$lc}) { - return "/" . $urls_for_texts{$textid}{$lc}; - } - elsif ($urls_for_texts{$textid}{en}) { - return "/" . $urls_for_texts{$textid}{en}; - } - else { - return "/" . $textid; - } -} - =head2 process_template ( $template_filename , $template_data_ref , $result_content_ref, $request_ref = {} ) Add some functions and variables needed by many templates and process the template with template toolkit. @@ -424,7 +382,6 @@ sub process_template ($template_filename, $template_data_ref, $result_content_re $template_data_ref->{display_date_without_time} = \&display_date_without_time; $template_data_ref->{display_date_ymd} = \&display_date_ymd; $template_data_ref->{display_date_tag} = \&display_date_tag; - $template_data_ref->{url_for_text} = \&url_for_text; $template_data_ref->{product_url} = \&product_url; $template_data_ref->{product_action_url} = \&product_action_url; $template_data_ref->{product_name_brand_quantity} = \&product_name_brand_quantity; @@ -2041,7 +1998,7 @@ sub display_list_of_tags ($request_ref, $query_ref) { # For the Environmental-Score, we want to display A+ before A even though A+ is after A in alphabetical order # If the tagid "a" is followed by tagid "a-plus", invert them - if (($tagtype eq 'environmental_score') and (defined $tags[1])) { + if (($tagtype eq 'ecoscore') or ($tagtype eq 'environmental_score') and (defined $tags[1])) { if (($tags[0]{_id} eq 'a') and ($tags[1]{_id} eq 'a-plus')) { my $tags_tmp = $tags[0]; @@ -2236,7 +2193,7 @@ sub display_list_of_tags ($request_ref, $query_ref) { . "\" style=\"max-height:80px;\"> " . $grade; } - elsif ($tagtype eq 'environmental_score') { + elsif (($tagtype eq 'ecoscore') or ($tagtype eq 'environmental_score')) { my $grade; if ($tagid eq "a-plus") { @@ -2257,9 +2214,9 @@ sub display_list_of_tags ($request_ref, $query_ref) { } $display - = "\"Environmental-Score " . $grade; @@ -7661,9 +7618,6 @@ sub display_page ($request_ref) { # Twitter account $html =~ s//$twitter_account/g; - # Replace urls for texts in links like with a localized name - $html =~ s/(href=")(\/[^"]+)/$1 . url_for_text($2)/eg; - my $status_code = $request_ref->{status_code} // 200; my $http_headers_ref = { diff --git a/po/common/fr.po b/po/common/fr.po index d7893bae3d7e2..87c7d422d5f5e 100644 --- a/po/common/fr.po +++ b/po/common/fr.po @@ -5048,7 +5048,7 @@ msgstr "Note Green-Score" # do not translate Green-Score msgctxt "environmental_score_calculation_details" msgid "Details of the calculation of the Green-Score" -msgstr "Détails du calcul de le Green-Score" +msgstr "Détails du calcul du Green-Score" # do not translate Green-Score msgctxt "environmental_score_information" @@ -5705,7 +5705,7 @@ msgstr "Les informations sur les ingrédients de ce produit ne sont pas indiqué msgctxt "environmental_score_edit_for_more_precise_environmental_score" msgid "For a more precise calculation of the Green-Score, you can edit the product page and add them." -msgstr "Pour un calcul plus précis de le Green-Score, vous pouvez modifier la fiche produit et les ajouter." +msgstr "Pour un calcul plus précis du Green-Score, vous pouvez modifier la fiche produit et les ajouter." msgctxt "environmental_score_packaging_ratio" msgid "ratio" @@ -5729,7 +5729,7 @@ msgstr "Les informations sur l'emballage de ce produit ne sont pas suffisamment msgctxt "environmental_score_edit_for_more_precise_environmental_score" msgid "For a more precise calculation of the Green-Score, you can modify the product page and add them." -msgstr "Pour un calcul plus précis de le Green-Score, vous pouvez modifier la fiche produit et les ajouter." +msgstr "Pour un calcul plus précis du Green-Score, vous pouvez modifier la fiche produit et les ajouter." msgctxt "environmental_score_final_score" msgid "Final score" @@ -5751,17 +5751,17 @@ msgstr "Si vous êtes le fabricant de ce produit, vous pouvez nous transmettre l # do not translate Green-Score and the link msgctxt "environmental_score_description" msgid "The Green-Score is an experimental score that summarizes the environmental impacts of food products." -msgstr "L'Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." +msgstr "Le Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." # do not translate Green-Score msgctxt "environmental_score_warning_fr" msgid "The Green-Score formula is subject to change as it is regularly improved to make it more precise." -msgstr "La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise." +msgstr "La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise." # do not translate Green-Score msgctxt "environmental_score_warning_international" msgid "The Green-Score was initially developped for France and it is being extended to other European countries. The Green-Score formula is subject to change as it is regularly improved to make it more precise and better suited to each country." -msgstr "Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays." +msgstr "Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays." msgctxt "environmental_score_warning_transportation_world" msgid "Select a country in order to include the full impact of transportation." diff --git a/templates/api/knowledge-panels/environment/environmental_score/environmental_score.tt.json b/templates/api/knowledge-panels/environment/environmental_score/environmental_score.tt.json index 65b7e1ac39c9d..1261d32eb397c 100644 --- a/templates/api/knowledge-panels/environment/environmental_score/environmental_score.tt.json +++ b/templates/api/knowledge-panels/environment/environmental_score/environmental_score.tt.json @@ -72,7 +72,7 @@ "element_type": "text", "text_element": { "html": ` -

[% lang('environmental_score_learn_more') %]

+

[% lang('environmental_score_learn_more') %]

` }, }, diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json index 7634918b12b19..6fac5d9327529 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json @@ -1096,7 +1096,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json index 7175805fc1307..0d962a25d7890 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json @@ -1750,7 +1750,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json index 905d48f4ffdcb..a9cd31139ff80 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json @@ -232,7 +232,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json index f365ee1566b83..aa79d9be016fb 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json @@ -315,7 +315,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels-fr.json b/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels-fr.json index 82a64caf6b4a4..215571166526a 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels-fr.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels-fr.json @@ -280,13 +280,13 @@ { "element_type" : "text", "text_element" : { - "html" : "L'Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." + "html" : "Le Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." } }, { "element_type" : "text", "text_element" : { - "html" : "\n \n Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays.\n \n ", + "html" : "\n \n Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays.\n \n ", "type" : "note" } }, @@ -322,7 +322,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

En savoir plus sur le Green-Score

\n" + "html" : "\n

En savoir plus sur le Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels.json b/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels.json index 62c7091b74c14..a3e2e95af0c96 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-knowledge-panels.json @@ -315,7 +315,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json index 1c78b45ad25d2..8946b54cd9d33 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json @@ -1090,7 +1090,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json index 9cae1a2d3809d..b42e8c1e15c53 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json @@ -1736,7 +1736,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json index 5ec72469c94da..666ac512087ec 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card-knowledge_panels_excluded-health_card.json @@ -233,7 +233,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json index 0cc69091dfd99..8017985d21641 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-knowledge-panels-knowledge-panels_included-health_card-environment_card.json @@ -316,7 +316,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels-fr.json b/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels-fr.json index e8c2ee47e975f..68e2d2ede965a 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels-fr.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels-fr.json @@ -281,13 +281,13 @@ { "element_type" : "text", "text_element" : { - "html" : "L'Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." + "html" : "Le Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires." } }, { "element_type" : "text", "text_element" : { - "html" : "\n \n Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays.\n \n ", + "html" : "\n \n Le Green-Score a été initialement conçu pour la France et est en cours d'extension à d'autres pays européens. La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise et mieux adaptée à chaque pays.\n \n ", "type" : "note" } }, @@ -323,7 +323,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

En savoir plus sur le Green-Score

\n" + "html" : "\n

En savoir plus sur le Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels.json b/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels.json index ed40596b479ad..e3339ee061965 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-knowledge-panels.json @@ -316,7 +316,7 @@ { "element_type" : "text", "text_element" : { - "html" : "\n

Learn more about the Green-Score

\n" + "html" : "\n

Learn more about the Green-Score

\n" } } ], diff --git a/tests/integration/expected_test_results/page_crawler/crawler-access-product-page.html b/tests/integration/expected_test_results/page_crawler/crawler-access-product-page.html index 456645d20b18f..4cb7697439767 100644 --- a/tests/integration/expected_test_results/page_crawler/crawler-access-product-page.html +++ b/tests/integration/expected_test_results/page_crawler/crawler-access-product-page.html @@ -2921,7 +2921,7 @@

Green-Score for this product

diff --git a/tests/integration/expected_test_results/page_crawler/normal-user-access-product-page.html b/tests/integration/expected_test_results/page_crawler/normal-user-access-product-page.html index 456645d20b18f..4cb7697439767 100644 --- a/tests/integration/expected_test_results/page_crawler/normal-user-access-product-page.html +++ b/tests/integration/expected_test_results/page_crawler/normal-user-access-product-page.html @@ -2921,7 +2921,7 @@

Green-Score for this product

diff --git a/tests/integration/expected_test_results/product_read/get-existing-product.html b/tests/integration/expected_test_results/product_read/get-existing-product.html index f64b02bed2262..517dc6b14408d 100644 --- a/tests/integration/expected_test_results/product_read/get-existing-product.html +++ b/tests/integration/expected_test_results/product_read/get-existing-product.html @@ -3587,7 +3587,7 @@

Green-Score for this product

diff --git a/tests/integration/expected_test_results/web_html/fr-product-2.html b/tests/integration/expected_test_results/web_html/fr-product-2.html index 342e42ca73f2c..d91ed1bc6ce76 100644 --- a/tests/integration/expected_test_results/web_html/fr-product-2.html +++ b/tests/integration/expected_test_results/web_html/fr-product-2.html @@ -2854,7 +2854,7 @@

Environnement

- L'Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires. + Le Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires.
@@ -2873,7 +2873,7 @@

Environnement

→ - La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise. + La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise.
@@ -3421,7 +3421,7 @@

Bonus et malus

⚠ ️ - Pour un calcul plus précis de le Green-Score, vous pouvez modifier la fiche produit et les ajouter. + Pour un calcul plus précis du Green-Score, vous pouvez modifier la fiche produit et les ajouter.

Si vous êtes le fabricant de ce produit, vous pouvez nous transmettre les informations avec notre plateforme gratuite pour les producteurs. @@ -3540,7 +3540,7 @@

Green-Score pour ce produit

diff --git a/tests/integration/expected_test_results/web_html/fr-product.html b/tests/integration/expected_test_results/web_html/fr-product.html index f12c727adb534..b9fb7632cceb8 100644 --- a/tests/integration/expected_test_results/web_html/fr-product.html +++ b/tests/integration/expected_test_results/web_html/fr-product.html @@ -2868,7 +2868,7 @@

Environnement

- L'Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires. + Le Green-Score est un score expérimental qui synthétise les impacts environnementaux des produits alimentaires.
@@ -2887,7 +2887,7 @@

Environnement

→ - La formule de le Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise. + La formule du Green-Score est susceptible d'évoluer car elle est régulièrement améliorée pour la rendre plus précise.
@@ -3435,7 +3435,7 @@

Bonus et malus

⚠ ️ - Pour un calcul plus précis de le Green-Score, vous pouvez modifier la fiche produit et les ajouter. + Pour un calcul plus précis du Green-Score, vous pouvez modifier la fiche produit et les ajouter.

Si vous êtes le fabricant de ce produit, vous pouvez nous transmettre les informations avec notre plateforme gratuite pour les producteurs. @@ -3554,7 +3554,7 @@

Green-Score pour ce produit

diff --git a/tests/integration/expected_test_results/web_html/world-product.html b/tests/integration/expected_test_results/web_html/world-product.html index 803cfb8deb1e0..01888f18fbd1b 100644 --- a/tests/integration/expected_test_results/web_html/world-product.html +++ b/tests/integration/expected_test_results/web_html/world-product.html @@ -3567,7 +3567,7 @@

Green-Score for this product

diff --git a/tests/unit/display.t b/tests/unit/display.t index 89107757647d6..8266b4397ec52 100644 --- a/tests/unit/display.t +++ b/tests/unit/display.t @@ -31,20 +31,6 @@ is(display_date_tag($t), '