From 26246aebe77ddfe28fc25424ff98ad533d301469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Gigandet?=
Date: Wed, 7 Apr 2021 17:21:08 +0000
Subject: [PATCH 1/2] Internationalization of the Eco-Score details template
---
po/common/common.pot | 140 ++++++++---------
po/common/en.po | 143 ++++++++----------
templates/ecoscore_details.tt.html | 54 +++----
.../ecoscore_details_simple_html.tt.html | 45 +++---
4 files changed, 173 insertions(+), 209 deletions(-)
diff --git a/po/common/common.pot b/po/common/common.pot
index f18bd19a6f4ce..a998d7a7eaca7 100644
--- a/po/common/common.pot
+++ b/po/common/common.pot
@@ -5431,216 +5431,202 @@ msgstr "If you use the same column on multiple lines to provide images URLs for
msgctxt "forest_footprint_one_line_explanation"
msgid "The forest footprint is calculated by taking into account the ingredients whose production requires soybeans, the cultivation of which is linked to deforestation."
-msgstr ""
+msgstr "The forest footprint is calculated by taking into account the ingredients whose production requires soybeans, the cultivation of which is linked to deforestation"
msgctxt "ecoscore_agribalyse_match_warning"
msgid "The Eco-Score can only be calculated if the product has a sufficiently precise category."
-msgstr ""
+msgstr "The Eco-Score can only be calculated if the product has a sufficiently precise category."
msgctxt "ecoscore_add_more_precise_category"
msgid "You can modify the product page to add a more precise category."
-msgstr ""
+msgstr "You can modify the product page to add a more precise category."
msgctxt "ecoscore_platform_promo"
msgid "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
-msgstr ""
+msgstr "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
msgctxt "ecoscore_warning_missing_information"
-msgid "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)"
-msgstr ""
+msgid "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)."
+msgstr "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)."
msgctxt "ecoscore_add_missing_information"
msgid "You can edit the product to add the missing information."
-msgstr ""
-
-# TODO DEDUPLICATE SOME STRINGS, CHECK THAT msgctxt are unique
+msgstr "You can edit the product to add the missing information."
msgctxt "ecoscore_product_category_reference_score"
msgid "Baseline score of the product category"
-msgstr ""
+msgstr "Baseline score of the product category"
msgctxt "ecoscore_panel_lca"
msgid "Lifecyle Analysis (LCA)"
-msgstr ""
+msgstr "Lifecyle Analysis (LCA)"
+# do not translate Agribalyse
msgctxt "ecoscore_agribalyse_category"
msgid "Agribalyse category"
-msgstr ""
+msgstr "Agribalyse category"
msgctxt "ecoscore_category_proxy_match"
msgid "Approximate match with the product category"
-msgstr ""
+msgstr "Approximate match with the product category"
msgctxt "ecoscore_category_exact_match"
msgid "Exact match with the product category"
-msgstr ""
+msgstr "Exact match with the product category"
msgctxt "ecoscore_pef_environmental_score"
-msgid "PEF environmental score:"
-msgstr ""
+msgid "PEF environmental score"
+msgstr "PEF environmental score"
msgctxt "ecoscore_incl_climate_change_impact"
-msgid "- including impact on climate change:"
-msgstr ""
+msgid "including impact on climate change"
+msgstr "including impact on climate change"
msgctxt "ecoscore_impact_detail_by_stages"
msgid "Details of the impacts by stages of the life cycle"
-msgstr ""
+msgstr "Details of the impacts by stages of the life cycle"
msgctxt "ecoscore_stage"
msgid "Stage"
-msgstr ""
+msgstr "Stage"
msgctxt "ecoscore_impact"
msgid "Impact"
-msgstr ""
+msgstr "Impact"
msgctxt "ecoscore_agriculture"
msgid "Agriculture"
-msgstr ""
+msgstr "Agriculture"
msgctxt "ecoscore_processing"
msgid "Processing"
-msgstr ""
+msgstr "Processing"
msgctxt "ecoscore_packaging"
msgid "Packaging"
-msgstr ""
+msgstr "Packaging"
msgctxt "ecoscore_transportation"
msgid "Transportation"
-msgstr ""
+msgstr "Transportation"
msgctxt "ecoscore_distribution"
msgid "Distribution"
-msgstr ""
+msgstr "Distribution"
msgctxt "ecoscore_consumption"
msgid "Consumption"
-msgstr ""
+msgstr "Consumption"
-msgctxt "ecoscore_lca_score_on_100"
-msgid "LCA score out of 100:"
-msgstr ""
+msgctxt "ecoscore_lca_score_out_of_100"
+msgid "LCA score out of 100"
+msgstr "LCA score out of 100"
msgctxt "ecoscore_no_agribalyse_category_match"
msgid "No match between product categories and Agribalyse categories."
-msgstr ""
+msgstr "No match between product categories and Agribalyse categories."
msgctxt "ecoscore_edit_category_to_more_granular"
msgid "You can modify the product page to add a more granular category."
-msgstr ""
+msgstr "You can modify the product page to add a more granular category."
msgctxt "ecoscore_additional_bonuses_and_maluses"
msgid "Additional bonuses and maluses"
-msgstr ""
+msgstr "Additional bonuses and maluses"
msgctxt "ecoscore_production_mode"
msgid "Production mode"
-msgstr ""
-
-msgctxt "ecoscore_label"
-msgid "Label"
-msgstr ""
+msgstr "Production mode"
msgctxt "ecoscore_no_labels_taken_into_account"
msgid "No labels taken into account for the production system."
-msgstr ""
+msgstr "No labels taken into account for the production system."
msgctxt "ecoscore_please_add_the_labels"
msgid "If this product has a label characterizing the production system (organic, fair trade, Label Rouge, Bleu Blanc Coeur etc.), you can modify the product sheet to add it."
-msgstr ""
+msgstr "If this product has a label characterizing the production system (organic, fair trade, Label Rouge, Bleu Blanc Coeur etc.), you can modify the product sheet to add it."
msgctxt "ecoscore_origin_of_ingredients"
msgid "Origin of ingredients"
-msgstr ""
+msgstr "Origin of ingredients"
msgctxt "ecoscore_ingredients_not_indicated"
msgid "The origins of the ingredients of this product are not indicated."
-msgstr ""
+msgstr "The origins of the ingredients of this product are not indicated."
msgctxt "ecoscore_please_add_the_ingredients"
msgid "If they are indicated on the packaging, you can modify the product sheet and add them."
-msgstr ""
+msgstr "If they are indicated on the packaging, you can modify the product sheet and add them."
msgctxt "ecoscore_environmental_policy"
-msgid "Environmental policy :"
-msgstr ""
+msgid "Environmental policy"
+msgstr "Environmental policy"
msgctxt "ecoscore_transportation"
-msgid "Transportation :"
-msgstr ""
+msgid "Transportation"
+msgstr "Transportation"
msgctxt "ecoscore_threatened_species"
msgid "Threatened species"
-msgstr ""
+msgstr "Threatened species"
msgctxt "ecoscore_ingredients_whose_cultivation_threatens_species"
-msgid "Ingredients whose cultivation threatens species:"
-msgstr ""
-
-msgctxt "ecoscore_threatened_species"
-msgid "Threatened species :"
-msgstr ""
+msgid "Ingredients whose cultivation threatens species"
+msgstr "Ingredients whose cultivation threatens species"
msgctxt "ecoscore_no_species_threatening_ingredients"
msgid "No ingredient which cultivation threatens species has been detected."
-msgstr ""
+msgstr "No ingredient which cultivation threatens species has been detected."
msgctxt "ecoscore_ingredients_unknown"
msgid "The information on the ingredients of this product has not been given."
-msgstr ""
+msgstr "The information on the ingredients of this product has not been given."
msgctxt "ecoscore_edit_for_more_precise_ecoscore"
msgid "For a more precise calculation of the Eco-Score, you can edit the product page and add them."
-msgstr ""
+msgstr "For a more precise calculation of the Eco-Score, you can edit the product page and add them."
msgctxt "ecoscore_packaging"
msgid "Packaging"
-msgstr ""
+msgstr "Packaging"
-# TODO INJECT FROM THE TEMPLATE - packaging.ecoscore_shape_ratio
msgctxt "ecoscore_packaging_ratio"
-msgid "(ratio : %s)"
-msgstr ""
+msgid "ratio"
+msgstr "ratio"
-# TODO INJECT FROM THE TEMPLATE - packaging.ecoscore_material_score
msgctxt "ecoscore_packaging_score"
-msgid "(score : %s)"
-msgstr ""
+msgid "score"
+msgstr "score"
msgctxt "ecoscore_score_of_all_components"
-msgid "Score of all components:"
-msgstr ""
-
-msgctxt "ecoscore_packaging"
-msgid "Packaging :"
-msgstr ""
+msgid "Score of all components"
+msgstr "Score of all components"
msgctxt "ecoscore_no_packaging_information"
msgid "The information about the packaging of this product is not filled in."
-msgstr ""
+msgstr "The information about the packaging of this product is not filled in."
msgctxt "ecoscore_unprecise_packaging_information"
msgid "The information about the packaging of this product is not sufficiently precise (exact shapes and materials of all components of the packaging)."
-msgstr ""
+msgstr "The information about the packaging of this product is not sufficiently precise (exact shapes and materials of all components of the packaging)."
msgctxt "ecoscore_edit_for_more_precise_ecoscore"
msgid "For a more precise calculation of the Eco-Score, you can modify the product page and add them."
-msgstr ""
+msgstr "For a more precise calculation of the Eco-Score, you can modify the product page and add them."
msgctxt "ecoscore_final_score"
msgid "Final score"
-msgstr "Score final"
+msgstr "Final score"
msgctxt "ecoscore_lower_the_score_lower_the_impact"
msgid "(the lower the score, the lower the impact)"
-msgstr ""
+msgstr "(the lower the score, the lower the impact)"
msgctxt "ecoscore_kg_co2_eq_kg_product"
msgid "kg CO2 eq/kg of product"
-msgstr ""
+msgstr "kg CO2 eq/kg of product"
msgctxt "ecoscore_platform_prompt_ecoscore_modal"
msgid "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
-msgstr ""
+msgstr "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
+
diff --git a/po/common/en.po b/po/common/en.po
index dbd9c3768b059..9042795c06cf6 100644
--- a/po/common/en.po
+++ b/po/common/en.po
@@ -5450,216 +5450,201 @@ msgstr "If you use the same column on multiple lines to provide images URLs for
msgctxt "forest_footprint_one_line_explanation"
msgid "The forest footprint is calculated by taking into account the ingredients whose production requires soybeans, the cultivation of which is linked to deforestation."
-msgstr ""
+msgstr "The forest footprint is calculated by taking into account the ingredients whose production requires soybeans, the cultivation of which is linked to deforestation"
msgctxt "ecoscore_agribalyse_match_warning"
msgid "The Eco-Score can only be calculated if the product has a sufficiently precise category."
-msgstr ""
+msgstr "The Eco-Score can only be calculated if the product has a sufficiently precise category."
msgctxt "ecoscore_add_more_precise_category"
msgid "You can modify the product page to add a more precise category."
-msgstr ""
+msgstr "You can modify the product page to add a more precise category."
msgctxt "ecoscore_platform_promo"
msgid "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
-msgstr ""
+msgstr "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
msgctxt "ecoscore_warning_missing_information"
-msgid "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)"
-msgstr ""
+msgid "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)."
+msgstr "Warning: some information necessary to calculate the Eco-Score with precision is not provided (see the details of the calculation below)."
msgctxt "ecoscore_add_missing_information"
msgid "You can edit the product to add the missing information."
-msgstr ""
-
-# TODO DEDUPLICATE SOME STRINGS, CHECK THAT msgctxt are unique
+msgstr "You can edit the product to add the missing information."
msgctxt "ecoscore_product_category_reference_score"
msgid "Baseline score of the product category"
-msgstr ""
+msgstr "Baseline score of the product category"
msgctxt "ecoscore_panel_lca"
msgid "Lifecyle Analysis (LCA)"
-msgstr ""
+msgstr "Lifecyle Analysis (LCA)"
+# do not translate Agribalyse
msgctxt "ecoscore_agribalyse_category"
msgid "Agribalyse category"
-msgstr ""
+msgstr "Agribalyse category"
msgctxt "ecoscore_category_proxy_match"
msgid "Approximate match with the product category"
-msgstr ""
+msgstr "Approximate match with the product category"
msgctxt "ecoscore_category_exact_match"
msgid "Exact match with the product category"
-msgstr ""
+msgstr "Exact match with the product category"
msgctxt "ecoscore_pef_environmental_score"
-msgid "PEF environmental score:"
-msgstr ""
+msgid "PEF environmental score"
+msgstr "PEF environmental score"
msgctxt "ecoscore_incl_climate_change_impact"
-msgid "- including impact on climate change:"
-msgstr ""
+msgid "including impact on climate change"
+msgstr "including impact on climate change"
msgctxt "ecoscore_impact_detail_by_stages"
msgid "Details of the impacts by stages of the life cycle"
-msgstr ""
+msgstr "Details of the impacts by stages of the life cycle"
msgctxt "ecoscore_stage"
msgid "Stage"
-msgstr ""
+msgstr "Stage"
msgctxt "ecoscore_impact"
msgid "Impact"
-msgstr ""
+msgstr "Impact"
msgctxt "ecoscore_agriculture"
msgid "Agriculture"
-msgstr ""
+msgstr "Agriculture"
msgctxt "ecoscore_processing"
-msgid "Transformation"
-msgstr ""
+msgid "Processing"
+msgstr "Processing"
msgctxt "ecoscore_packaging"
msgid "Packaging"
-msgstr ""
+msgstr "Packaging"
msgctxt "ecoscore_transportation"
msgid "Transportation"
-msgstr ""
+msgstr "Transportation"
msgctxt "ecoscore_distribution"
msgid "Distribution"
-msgstr ""
+msgstr "Distribution"
msgctxt "ecoscore_consumption"
msgid "Consumption"
-msgstr ""
+msgstr "Consumption"
-msgctxt "ecoscore_lca_score_on_100"
-msgid "LCA score out of 100:"
-msgstr ""
+msgctxt "ecoscore_lca_score_out_of_100"
+msgid "LCA score out of 100"
+msgstr "LCA score out of 100"
msgctxt "ecoscore_no_agribalyse_category_match"
msgid "No match between product categories and Agribalyse categories."
-msgstr ""
+msgstr "No match between product categories and Agribalyse categories."
msgctxt "ecoscore_edit_category_to_more_granular"
msgid "You can modify the product page to add a more granular category."
-msgstr ""
+msgstr "You can modify the product page to add a more granular category."
msgctxt "ecoscore_additional_bonuses_and_maluses"
msgid "Additional bonuses and maluses"
-msgstr ""
+msgstr "Additional bonuses and maluses"
msgctxt "ecoscore_production_mode"
msgid "Production mode"
-msgstr ""
-
-msgctxt "ecoscore_label"
-msgid "Label"
-msgstr ""
+msgstr "Production mode"
msgctxt "ecoscore_no_labels_taken_into_account"
msgid "No labels taken into account for the production system."
-msgstr ""
+msgstr "No labels taken into account for the production system."
msgctxt "ecoscore_please_add_the_labels"
msgid "If this product has a label characterizing the production system (organic, fair trade, Label Rouge, Bleu Blanc Coeur etc.), you can modify the product sheet to add it."
-msgstr ""
+msgstr "If this product has a label characterizing the production system (organic, fair trade, Label Rouge, Bleu Blanc Coeur etc.), you can modify the product sheet to add it."
msgctxt "ecoscore_origin_of_ingredients"
msgid "Origin of ingredients"
-msgstr ""
+msgstr "Origin of ingredients"
msgctxt "ecoscore_ingredients_not_indicated"
msgid "The origins of the ingredients of this product are not indicated."
-msgstr ""
+msgstr "The origins of the ingredients of this product are not indicated."
msgctxt "ecoscore_please_add_the_ingredients"
msgid "If they are indicated on the packaging, you can modify the product sheet and add them."
-msgstr ""
+msgstr "If they are indicated on the packaging, you can modify the product sheet and add them."
msgctxt "ecoscore_environmental_policy"
-msgid "Environmental policy :"
-msgstr ""
+msgid "Environmental policy"
+msgstr "Environmental policy"
msgctxt "ecoscore_transportation"
-msgid "Transportation :"
-msgstr ""
+msgid "Transportation"
+msgstr "Transportation"
msgctxt "ecoscore_threatened_species"
msgid "Threatened species"
-msgstr ""
+msgstr "Threatened species"
msgctxt "ecoscore_ingredients_whose_cultivation_threatens_species"
-msgid "Ingredients whose cultivation threatens species:"
-msgstr ""
-
-msgctxt "ecoscore_threatened_species"
-msgid "Threatened species :"
-msgstr ""
+msgid "Ingredients whose cultivation threatens species"
+msgstr "Ingredients whose cultivation threatens species"
msgctxt "ecoscore_no_species_threatening_ingredients"
msgid "No ingredient which cultivation threatens species has been detected."
-msgstr ""
+msgstr "No ingredient which cultivation threatens species has been detected."
msgctxt "ecoscore_ingredients_unknown"
msgid "The information on the ingredients of this product has not been given."
-msgstr ""
+msgstr "The information on the ingredients of this product has not been given."
msgctxt "ecoscore_edit_for_more_precise_ecoscore"
msgid "For a more precise calculation of the Eco-Score, you can edit the product page and add them."
-msgstr ""
+msgstr "For a more precise calculation of the Eco-Score, you can edit the product page and add them."
msgctxt "ecoscore_packaging"
msgid "Packaging"
-msgstr ""
+msgstr "Packaging"
-# TODO INJECT FROM THE TEMPLATE - packaging.ecoscore_shape_ratio
msgctxt "ecoscore_packaging_ratio"
-msgid "(ratio : %s)"
-msgstr ""
+msgid "ratio"
+msgstr "ratio"
-# TODO INJECT FROM THE TEMPLATE - packaging.ecoscore_material_score
msgctxt "ecoscore_packaging_score"
-msgid "(score : %s)"
-msgstr ""
+msgid "score"
+msgstr "score"
msgctxt "ecoscore_score_of_all_components"
-msgid "Score of all components:"
-msgstr ""
-
-msgctxt "ecoscore_packaging"
-msgid "Packaging :"
-msgstr ""
+msgid "Score of all components"
+msgstr "Score of all components"
msgctxt "ecoscore_no_packaging_information"
msgid "The information about the packaging of this product is not filled in."
-msgstr ""
+msgstr "The information about the packaging of this product is not filled in."
msgctxt "ecoscore_unprecise_packaging_information"
msgid "The information about the packaging of this product is not sufficiently precise (exact shapes and materials of all components of the packaging)."
-msgstr ""
+msgstr "The information about the packaging of this product is not sufficiently precise (exact shapes and materials of all components of the packaging)."
msgctxt "ecoscore_edit_for_more_precise_ecoscore"
-msgid "For a more precise calculation of the Eco-Score, you can modify the product page and add them.
"
-msgstr ""
+msgid "For a more precise calculation of the Eco-Score, you can modify the product page and add them."
+msgstr "For a more precise calculation of the Eco-Score, you can modify the product page and add them."
msgctxt "ecoscore_final_score"
msgid "Final score"
-msgstr "Score final"
+msgstr "Final score"
msgctxt "ecoscore_lower_the_score_lower_the_impact"
msgid "(the lower the score, the lower the impact)"
-msgstr ""
+msgstr "(the lower the score, the lower the impact)"
msgctxt "ecoscore_kg_co2_eq_kg_product"
msgid "kg CO2 eq/kg of product"
-msgstr ""
+msgstr "kg CO2 eq/kg of product"
msgctxt "ecoscore_platform_prompt_ecoscore_modal"
msgid "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
-msgstr ""
+msgstr "If you are the manufacturer of this product, you can send us the information with our free platform for producers."
diff --git a/templates/ecoscore_details.tt.html b/templates/ecoscore_details.tt.html
index a3a3f19858a97..c16b638230fc1 100644
--- a/templates/ecoscore_details.tt.html
+++ b/templates/ecoscore_details.tt.html
@@ -13,25 +13,26 @@ [% display_icon('lca') %] [% lang('ecoscore_panel_lca') %]
[% IF agribalyse.code %]
-
- [% lang('ecoscore_agribalyse_category') %] :
- [% agribalyse.name_fr %]
+ [% IF lc == "fr" %]
+ [% agribalyse.name_fr %]
+ [% ELSE %]
+ [% agribalyse.name_en %]
+ [% END %]
+
-
- - [% lang('ecoscore_pef_environmental_score') %] [% agribalyse.ef_total FILTER format("%.2f"); %] [% lang('ecoscore_lower_the_score_lower_the_impact') %]
-
- - [% lang('ecoscore_incl_climate_change_impact') %] [% agribalyse.co2_total FILTER format("%.2f"); %] [% lang('ecoscore_kg_co2_eq_kg_product') %]
+ - [% lang('ecoscore_pef_environmental_score') %][% sep %]: [% agribalyse.ef_total FILTER format("%.2f"); %] [% lang('ecoscore_lower_the_score_lower_the_impact') %]
+ - - [% lang('ecoscore_incl_climate_change_impact') %][% sep %]: [% agribalyse.co2_total FILTER format("%.2f"); %] [% lang('ecoscore_kg_co2_eq_kg_product') %]
-
[% lang('ecoscore_impact_detail_by_stages') %]
[% lang('stage') %] |
@@ -47,7 +48,7 @@ [% display_icon('lca') %] [% lang('ecoscore_panel_lca') %]
- [% display_icon('processing') %] [% lang('ecoscore_transformation') %] |
+ [% display_icon('processing') %] [% lang('ecoscore_processing') %] |
[% (100 * agribalyse.ef_processing / agribalyse.ef_total) FILTER format("%.1f"); %]% |
@@ -94,7 +95,7 @@ [% display_icon('lca') %] [% lang('ecoscore_panel_lca') %]
|
- [% lang('ecoscore_lca_score_on_100') %] [% round(agribalyse.score) %]
+ [% lang('ecoscore_lca_score_out_of_100') %][% sep %]: [% round(agribalyse.score) %]
[% ELSE %]
@@ -115,18 +116,15 @@ [% lang('ecoscore_additional_bonuses_and_maluses') %]
-
[% display_icon('agriculture') %] [% lang('ecoscore_production_mode') %]
[% IF adjustments.production_system.value %]
-
-
[% lang('ecoscore_label') %] [% display_taxonomy_tag("labels",adjustments.production_system.label) %] : +[% adjustments.production_system.value %]
+
[% display_taxonomy_tag("labels",adjustments.production_system.label) %][% sep %]: +[% adjustments.production_system.value %]
[% ELSE %]
[% lang('ecoscore_no_labels_taken_into_account') %]
[% IF adjustments.production_system.warning %]
-
[% lang('ecoscore_please_add_the_labels') %]
[% lang('ecoscore_platform_prompt_ecoscore_modal') %]
@@ -143,24 +141,22 @@
[% display_icon('public') %] [% lang('ecoscore_origin_of_ingredients') %]
[% FOREACH origin IN adjustments.origins_of_ingredients.aggregated_origins %]
-
[% display_taxonomy_tag("origins",origin.origin) %]: [% round(origin.percent) %]%
+
[% display_taxonomy_tag("origins",origin.origin) %][% sep %]: [% round(origin.percent) %]%
[% END %]
[% END %]
[% IF adjustments.origins_of_ingredients.warning %]
-
[% lang('ecoscore_ingredients_not_indicated') %]
-
[% lang('ecoscore_please_add_the_ingredients') %]
[% lang('ecoscore_platform_prompt_ecoscore_modal') %]
[% END %]
- [% lang('ecoscore_environmental_policy') %] [% IF adjustments.origins_of_ingredients.epi_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.epi_value) %]
- [% lang('ecoscore_transportation') %] [% IF adjustments.origins_of_ingredients.transportation_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.transportation_value) %]
+ [% lang('ecoscore_environmental_policy') %][% sep %]: [% IF adjustments.origins_of_ingredients.epi_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.epi_value) %]
+ [% lang('ecoscore_transportation') %][% sep %]: [% IF adjustments.origins_of_ingredients.transportation_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.transportation_value) %]
@@ -173,14 +169,12 @@ [% display_icon('public') %] [% lang('ecoscore_origin_of_ingredients') %][% display_icon('monkey_unhappy') %] [% lang('ecoscore_threatened_species') %]
[% IF adjustments.threatened_species.value %]
- [% lang('ecoscore_ingredients_whose_cultivation_threatens_species') %]
+ [% lang('ecoscore_ingredients_whose_cultivation_threatens_species') %][% sep %]:
- [% display_taxonomy_tag("ingredients",adjustments.threatened_species.ingredient) %]
-
- [% lang('ecoscore_threatened_species') %] [% adjustments.threatened_species.value %]
+ [% lang('ecoscore_threatened_species') %][% sep %]: [% adjustments.threatened_species.value %]
[% ELSE %]
-
[% lang('ecoscore_no_species_threatening_ingredients') %]
[% END %]
@@ -205,18 +199,15 @@ [% display_icon('packaging') %] [% lang('ecoscore_packaging') %]
[% FOREACH packaging IN adjustments.packaging.packagings %]
[% display_taxonomy_tag("packaging_shapes",packaging.shape) %]
-
- [% lang('ecoscore_packaging_ratio') %](ratio : [% packaging.ecoscore_shape_ratio %])
+ ([% lang('ecoscore_packaging_ratio') %][% sep %]: [% packaging.ecoscore_shape_ratio %])
-
[% display_taxonomy_tag("packaging_materials",packaging.material) %]
-
- [% lang('ecoscore_packaging_score') %](score : [% packaging.ecoscore_material_score %])
+ ([% lang('ecoscore_packaging_score') %][% sep %]: [% packaging.ecoscore_material_score %])
[% END %]
- [% lang('ecoscore_score_of_all_components') %] [% adjustments.packaging.score %]
-
- [% lang('ecoscore_packaging_enum') %] [% IF adjustments.packaging.value > 0 %]+[% END %][% adjustments.packaging.value %]
+ [% lang('ecoscore_score_of_all_components') %][% sep %]: [% adjustments.packaging.score %]
+ [% lang('ecoscore_packaging') %][% sep %]: [% IF adjustments.packaging.value > 0 %]+[% END %][% adjustments.packaging.value %]
[% END %]
[% IF adjustments.packaging.warning %]
@@ -225,7 +216,6 @@ [% display_icon('packaging') %] [% lang('ecoscore_packaging') %]
[% IF adjustments.packaging.warning == "packaging_data_missing" %]
[% lang('ecoscore_no_packaging_information') %]
[% ELSE %]
-
[% lang('ecoscore_unprecise_packaging_information') %]
[% END %]
diff --git a/templates/ecoscore_details_simple_html.tt.html b/templates/ecoscore_details_simple_html.tt.html
index 2be17e3fa597f..0a460fa4162d0 100644
--- a/templates/ecoscore_details_simple_html.tt.html
+++ b/templates/ecoscore_details_simple_html.tt.html
@@ -14,32 +14,37 @@ ♺ [% lang('ecoscore_panel_lca') %]
[% lang('ecoscore_category_exact_match') %]
[% END %]
">
- [% agribalyse.name_fr %]
+ [% IF lc == "fr"]
+ [% agribalyse.name_fr %]
+ [% ELSE %]
+ [% agribalyse.name_en %]
+ [% END %]
+
- - [% lang('ecoscore_pef_environmental_score') %] [% agribalyse.ef_total FILTER format("%.2f"); %] [% lang('ecoscore_lower_the_score_lower_the_impact') %]
+ - [% lang('ecoscore_pef_environmental_score') %][% sep %]: [% agribalyse.ef_total FILTER format("%.2f"); %] [% lang('ecoscore_lower_the_score_lower_the_impact') %]
- - [% lang('ecoscore_incl_climate_change_impact') %] [% agribalyse.co2_total FILTER format("%.2f"); %] [% lang('ecoscore_kg_co2_eq_kg_product') %]
+ - - [% lang('ecoscore_incl_climate_change_impact') %][% sep %]: [% agribalyse.co2_total FILTER format("%.2f"); %] [% lang('ecoscore_kg_co2_eq_kg_product') %]
[% lang('ecoscore_impact_detail_by_stages') %]
- 🚜 [% lang('ecoscore_agriculture') %]: [% (100 * agribalyse.ef_agriculture / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🚜 [% lang('ecoscore_agriculture') %][% sep %]: [% (100 * agribalyse.ef_agriculture / agribalyse.ef_total) FILTER format("%.1f"); %]%
- 🏭 [% lang('ecoscore_transformation') %]: [% (100 * agribalyse.ef_processing / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🏭 [% lang('ecoscore_processing') %][% sep %]: [% (100 * agribalyse.ef_processing / agribalyse.ef_total) FILTER format("%.1f"); %]%
- 🥫 [% lang('ecoscore_packaging') %]: [% (100 * agribalyse.ef_packaging / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🥫 [% lang('ecoscore_packaging') %][% sep %]: [% (100 * agribalyse.ef_packaging / agribalyse.ef_total) FILTER format("%.1f"); %]%
- 🚚 [% lang('ecoscore_transportation') %]: [% (100 * agribalyse.ef_transportation / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🚚 [% lang('ecoscore_transportation') %][% sep %]: [% (100 * agribalyse.ef_transportation / agribalyse.ef_total) FILTER format("%.1f"); %]%
- 🛒 [% lang('ecoscore_distribution') %]: [% (100 * agribalyse.ef_distribution / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🛒 [% lang('ecoscore_distribution') %][% sep %]: [% (100 * agribalyse.ef_distribution / agribalyse.ef_total) FILTER format("%.1f"); %]%
- 🍳 [% lang('ecoscore_consumption') %]: [% (100 * agribalyse.ef_consumption / agribalyse.ef_total) FILTER format("%.1f"); %]%
+ 🍳 [% lang('ecoscore_consumption') %][% sep %]: [% (100 * agribalyse.ef_consumption / agribalyse.ef_total) FILTER format("%.1f"); %]%
- [% lang('ecoscore_lca_score_on_100') %] [% round(agribalyse.score) %]
+ [% lang('ecoscore_lca_score_out_of_100') %][% sep %]: [% round(agribalyse.score) %]
[% ELSE %]
@@ -57,7 +62,7 @@ [% lang('ecoscore_additional_bonuses_and_maluses') %]
🚜 [% lang('ecoscore_production_mode') %]
[% IF adjustments.production_system.value %]
- [% lang('ecoscore_label') %] [% display_taxonomy_tag("labels",adjustments.production_system.label) %] : +[% adjustments.production_system.value %]
+ [% display_taxonomy_tag("labels",adjustments.production_system.label) %] : +[% adjustments.production_system.value %]
[% ELSE %]
[% lang('ecoscore_no_labels_taken_into_account') %]
@@ -76,7 +81,7 @@ 🌎 [% lang('ecoscore_origin_of_ingredients') %]
[% IF adjustments.origins_of_ingredients.aggregated_origins %]
[% FOREACH origin IN adjustments.origins_of_ingredients.aggregated_origins %]
- - [% display_taxonomy_tag("origins",origin.origin) %]: [% round(origin.percent) %]%
+ - [% display_taxonomy_tag("origins",origin.origin) %][% sep %]: [% round(origin.percent) %]%
[% END %]
[% END %]
@@ -92,8 +97,8 @@ 🌎 [% lang('ecoscore_origin_of_ingredients') %]
[% END %]
- [% lang('ecoscore_environmental_policy') %] [% IF adjustments.origins_of_ingredients.epi_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.epi_value) %]
- [% lang('ecoscore_transportation') %] [% IF adjustments.origins_of_ingredients.transportation_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.transportation_value) %]
+ [% lang('ecoscore_environmental_policy') %][% sep %]: [% IF adjustments.origins_of_ingredients.epi_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.epi_value) %]
+ [% lang('ecoscore_transportation') %][% sep %]: [% IF adjustments.origins_of_ingredients.transportation_value > 0 %]+[% END %][% round(adjustments.origins_of_ingredients.transportation_value) %]
@@ -105,7 +110,7 @@ 🌴 [% lang('ecoscore_threatened_species') %]
[% display_taxonomy_tag("ingredients",adjustments.threatened_species.ingredient) %]
- [% lang('ecoscore_threatened_species') %] [% adjustments.threatened_species.value %]
+ [% lang('ecoscore_threatened_species') %][% sep %]: [% adjustments.threatened_species.value %]
[% ELSE %]
[% lang('ecoscore_no_species_threatening_ingredients') %]
@@ -119,18 +124,16 @@ 🥫 [% lang('ecoscore_packaging') %]
[% FOREACH packaging IN adjustments.packaging.packagings %]
[% display_taxonomy_tag("packaging_shapes",packaging.shape) %]
-
- [% lang('ecoscore_packaging_ratio') %](ratio : [% packaging.ecoscore_shape_ratio %])
+ ([% lang('ecoscore_packaging_ratio') %][% sep %]: [% packaging.ecoscore_shape_ratio %])
-
[% display_taxonomy_tag("packaging_materials",packaging.material) %]
-
- [% lang('ecoscore_packaging_score') %](score : [% packaging.ecoscore_material_score %])
+ ([% lang('ecoscore_packaging_score') %][% sep %]: [% packaging.ecoscore_material_score %])
[% END %]
- [% lang('ecoscore_score_of_all_components') %] [% adjustments.packaging.score %]
+ [% lang('ecoscore_score_of_all_components') %][% sep %]: [% adjustments.packaging.score %]
- [% lang('ecoscore_packaging') %] [% IF adjustments.packaging.value > 0 %]+[% END %][% adjustments.packaging.value %]
+ [% lang('ecoscore_packaging') %][% sep %]: [% IF adjustments.packaging.value > 0 %]+[% END %][% adjustments.packaging.value %]
[% END %]
[% IF adjustments.packaging.warning %]
From 0cae79bd56a61742db2ff9573d40f0a52a4320d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Gigandet?=
Date: Wed, 7 Apr 2021 17:22:51 +0000
Subject: [PATCH 2/2] Internationalization of the Eco-Score details template
---
templates/ecoscore_details_simple_html.tt.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/ecoscore_details_simple_html.tt.html b/templates/ecoscore_details_simple_html.tt.html
index 0a460fa4162d0..6af0d5aaa628e 100644
--- a/templates/ecoscore_details_simple_html.tt.html
+++ b/templates/ecoscore_details_simple_html.tt.html
@@ -14,7 +14,7 @@ ♺ [% lang('ecoscore_panel_lca') %]
[% lang('ecoscore_category_exact_match') %]
[% END %]
">
- [% IF lc == "fr"]
+ [% IF lc == "fr" %]
[% agribalyse.name_fr %]
[% ELSE %]
[% agribalyse.name_en %]