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

More packaging shapes #5608

Merged
merged 14 commits into from
Sep 12, 2021
Merged

More packaging shapes #5608

merged 14 commits into from
Sep 12, 2021

Conversation

packaging-fix-for-pains-de-mie
@teolemon teolemon changed the title Packaging fix for pains de mie More packaging shapes in French Sep 3, 2021
@teolemon teolemon added 📦 Packaging shapes https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/packaging_shapes.txt 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies labels Sep 3, 2021
@teolemon teolemon requested a review from a team September 3, 2021 15:59
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.

To avoid issues, all entries in this taxonomy should have a unique English canonical name. It's really not simple as many of those French words are often translated interchangeably by different English names.

I would suggest to start with a few entries first, the ones that are the most common and associated with food.

We also need to make sure that any additional entry will be correctly mapped to an Eco-Score entry.

@teolemon
Copy link
Member Author

teolemon commented Sep 6, 2021

All those are in the CITEO system and guidelines, and as a result are likely to be used in French recycling instructions. Barring any packaging shape facet, that's the best I can do.

@teolemon teolemon changed the title More packaging shapes in French More packaging shapes Sep 7, 2021
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.

Perfect, thank you!

@teolemon
Copy link
Member Author

teolemon commented Sep 7, 2021

@stephanegigandet some tests are failing

@stephanegigandet
Copy link
Contributor

Some of the new entries were already there as synonyms.

Errors in the packaging_shapes taxonomy definition:
ERROR - en:cup already is a synonym of en:pot for entry en:pot - en:cup cannot be mapped to entry en:cup
ERROR - en:tie already is a synonym of en:fastener for entry en:fastener - en:tie cannot be mapped to entry en:tie
ERROR - en:band already is a synonym of en:strip for entry en:strip - en:string cannot be mapped to entry en:string
ERROR - en:cover already is a synonym of en:lid for entry en:lid - en:cover cannot be mapped to entry en:cover
Errors in the packaging_shapes taxonomy definition at lib/ProductOpener/Tags.pm line 995.

I'll try to fix them.

@stephanegigandet
Copy link
Contributor

@teolemon : I think I fixed the conflicting entries, and I added some plurals + some tests. Remaining work needed: assigning a shape ratio for the new entries so that they can be taken into account correctly for the Eco-Score.

@sonarcloud
Copy link

sonarcloud bot commented Sep 10, 2021

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

@teolemon
Copy link
Member Author

@stephanegigandet good to merge, and shape ratio in the next PR ?

@teolemon teolemon merged commit f335494 into main Sep 12, 2021
@teolemon teolemon deleted the packaging-fix-for-pains-de-mie branch September 12, 2021 12:39
hangy added a commit to hangy/openfoodfacts-server that referenced this pull request Sep 12, 2021
* More packaging shapes (openfoodfacts#5608)

* packaging-fix-for-pains-de-mie

packaging-fix-for-pains-de-mie

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* fix conflicting entries, add tests

* fix conflicting entries, add tests

Co-authored-by: Stéphane Gigandet <[email protected]>

* fix: Differentiate between rtl and ltr for the image position

* i18n: Make 'X g / 100 g' translatable (openfoodfacts#5655)

* i18n: Make 'X g / 100 g' translatable, especially for RTL languages

* fix: Use the old '%.2e' hack to format the decimals

* fix: Move selected packaging photos to new main language

Co-authored-by: Pierre Slamich <[email protected]>
Co-authored-by: Stéphane Gigandet <[email protected]>
Co-authored-by: hangy <[email protected]>
ocervell pushed a commit that referenced this pull request Sep 13, 2021
* packaging-fix-for-pains-de-mie

packaging-fix-for-pains-de-mie

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* Update packaging_shapes.txt

* fix conflicting entries, add tests

* fix conflicting entries, add tests

Co-authored-by: Stéphane Gigandet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Packaging shapes https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/packaging_shapes.txt 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants