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: Pl ingredients #7791

Merged
merged 15 commits into from
May 2, 2023
Merged

taxonomy: Pl ingredients #7791

merged 15 commits into from
May 2, 2023

Conversation

moon-rabbitOFF
Copy link
Contributor

No description provided.

@github-actions github-actions bot added 🥗 Ingredients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies labels Dec 3, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@stephanegigandet stephanegigandet changed the title Pl ingredients taxonomy: Pl ingredients Dec 6, 2022
Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

There is a new mechanism to handle things like "dried something", we should not add them to the ingredients taxonomy, and instead we can enrich the ingredients_processing.txt taxonomy to add translations of "dried" etc. in other languages.

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Jan 16, 2023
@benbenben2
Copy link
Collaborator

@stephanegigandet

@moon-rabbitOFF is right, it does not work for all languages. Polish, for example: https://pl.openfoodfacts.org/cgi/test_ingredients_analysis.pl?ingredients_text=liofilizowane+ananasy&type=add&action=process&submit=Envoyer

@moon-rabbitOFF, you have to edit the file lib/ProductOpener/ingredients.pm.
Under the comment
# English, French etc. match before or after the ingredient, require a space
you add a new line:
or ($product_lc eq 'pl')

That can be tackled in a different pull request (you will have merge conflict if you do it from this actual branch).

For this current pull request, make sure you keep only ingredients in this ingredients.txt file and processing method in ingredients_processing.txt and that should be fine.

@benbenben2
Copy link
Collaborator

@stephanegigandet, please review the last changes

Thank you @Teiron for your pull request related to this one

@codecov-commenter
Copy link

Codecov Report

Merging #7791 (58638d0) into main (e0f97b6) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #7791   +/-   ##
=======================================
  Coverage   48.16%   48.16%           
=======================================
  Files         109      109           
  Lines       21015    21015           
  Branches     4739     4739           
=======================================
  Hits        10122    10122           
  Misses       9618     9618           
  Partials     1275     1275           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Apr 25, 2023
fr:graines de tournesol décortiquées
it:semi di girasole sbucciati
pl:nasiona słonecznika łuskane, łuskane nasiona słonecznika
# en:shelled sunflower seeds
Copy link
Contributor

Choose a reason for hiding this comment

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

If everything is commented out, we need to remove the <en:sunflower seed on top

Copy link
Collaborator

Choose a reason for hiding this comment

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

<en:sunflower seed
is now commented as well (not removed, if future contributor see it commented that will be a hint to understand that they are handled using processing taxonomy. Whereas if we remove the whole block there is risk that a future contributor add it in the taxonomy (although it should be noticed during code review))

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok my bad, I didn't look correctly

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@benbenben2 benbenben2 merged commit 2a3244f into main May 2, 2023
@benbenben2 benbenben2 deleted the pl-ingredients branch May 2, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🥗 Ingredients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants