Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taxonomy: Add Canadian front-of-package nutrition symbol #11284

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

github-throwaway
Copy link
Contributor

@github-throwaway github-throwaway commented Jan 24, 2025

What

Add font-of-package nutrition symbol from Health Canada.

There is probably a better naming convention for the 56 label variations. But this is a start. Happy for any feedback.

Related issue(s) and discussion

@github-throwaway github-throwaway requested a review from a team as a code owner January 24, 2025 11:52
@github-actions github-actions bot added the 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies label Jan 24, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.32%. Comparing base (640ef01) to head (683a162).
Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11284      +/-   ##
==========================================
- Coverage   49.33%   49.32%   -0.01%     
==========================================
  Files          79       80       +1     
  Lines       22510    22575      +65     
  Branches     5387     5397      +10     
==========================================
+ Hits        11105    11135      +30     
- Misses      10045    10085      +40     
+ Partials     1360     1355       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@CharlesNepote CharlesNepote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok to me, but another review would be useful: @aleene @stephanegigandet ?

taxonomies/labels.txt Outdated Show resolved Hide resolved
Co-authored-by: Charles Nepote <[email protected]>
@aleene
Copy link
Contributor

aleene commented Jan 29, 2025

I noticed that these are svg files. Is this allowed? Especially for integration with Hunger games?

@github-throwaway
Copy link
Contributor Author

I noticed that these are svg files. Is this allowed? Especially for integration with Hunger games?

Stephane told me to convert the .eps files to .svg.

@github-throwaway
Copy link
Contributor Author

As mentioned on Slack:

Oh you should also use "normal" names: High in Sat fat and Sodium instead of front-of-package-nutrition-symbol-saturated-fat-sugars-sodium . Maybe you can add (Canada) not to be confused with labels from elsewhere.

So for the following logo he would type "High in Sa.....": https://raw.githubusercontent.com/openfoodfacts/openfoodfacts-server/e8ae83086fe3fd7a1caf10f02605c982f97bb4f7/html/images/lang/en/labels/front-of-package-nutrition-symbol-saturated-fat-sodium.120x90.svg
I would not make a difference between horizontal and vertical.
We don't do it for the Nutri-Score (see this label).

The language should work this way:
if you are on https://ca-fr.openfoodfacts.org/ you should start typing "Élevé en Gra........" and the system should suggest: fr: Élevé en Gras saturés
id you are on https://ca-en.openfoodfacts.org/ you should start typing "High in Sa....." and the system should suggest en: High in Saturated fat.
Provided by:
en: High in Saturated fat
fr: Élevé en gras saturés
label_categories:en:health-claims
label_categories:en:nutritional-values
property_type:en:leaf
image:en front-of-package-nutrition-symbol-saturated-fat-sugars-sodium.120x90.svg
web:en:https://www.canada.ca/en/health-canada/services/food-nutrition/nutrition-labelling/front-package.html
image:fr front-of-package-nutrition-symbol-gras-satures.120x90.svg
web:fr:https://www.canada.ca/fr/sante-canada/services/aliments-nutrition/etiquetage-nutritionnel/devant-emballage.html
ca-fr.openfoodfacts.orgca-fr.openfoodfacts.org (47 kB)
https://ca-fr.openfoodfacts.org/
ca.openfoodfacts.orgca.openfoodfacts.org (47 kB)
https://ca-en.openfoodfacts.org/

So I think you should simplify your proposal as is:
one entry for two languages and two logos
only one picture for each category/language
maybe you could add image:xx:[name_of_the_bilingual_image]; xx is used for all other languages. A spanish speaker living in Canada, and viewing https://ca-es.openfoodfacts.org/ would be able to view the bilingual logo.

@github-throwaway github-throwaway changed the title taxonomy: Add Canadian font-of-package nutrition symbol taxonomy: Add Canadian front-of-package nutrition symbol Feb 1, 2025
@github-throwaway
Copy link
Contributor Author

Changes have been made. Thoughts?

@stephanegigandet @aleene @CharlesNepote

@stephanegigandet
Copy link
Contributor

Hi @github-throwaway , thanks for adding the logos!

I suggest that we keep only the horizontal version, with the 3 language variations logos in each of the 7 entries:

< en:Canadian front-of-package nutrition symbol
en: High in Sat fat Sugars Sodium - Health Canada
fr: Élevé en Gras sat. Sucres Sodium - Santé Canada
image:en:high-in-sat-fat-sugars-sodium-health-canada.120x90.svg
image:fr:eleve-en-gras-sat-sucres-sodium-sante-canada.120x90.svg
image:xx:high-in-sat-fat-sugars-sodium-health-canada-eleve-en-gras-sat-sucres-sodium-sante-canada.120x90.svg

So that would be only 7 entries, + the parent entry. Label name would be exactly the text shown on logo, and the file name matches the label name.

If we do it this way, then we will display the English logo on the English site, the French logo on the French site, and the English+French logo for other languages, as Charles suggested.

@github-throwaway
Copy link
Contributor Author

github-throwaway commented Feb 4, 2025

@stephanegigandet Is there a special reason why in the checks the linter does not apply the fixes automatically?

Copy link

sonarqubecloud bot commented Feb 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add official labels from Canada Health
5 participants