-
-
Notifications
You must be signed in to change notification settings - Fork 470
fix: add an explanation for the missing value and unit to a product #11998
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #11998 +/- ##
==========================================
+ Coverage 49.88% 52.37% +2.48%
==========================================
Files 83 86 +3
Lines 22984 23118 +134
Branches 5508 5552 +44
==========================================
+ Hits 11466 12108 +642
+ Misses 10121 9450 -671
- Partials 1397 1560 +163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
po/common/common.pot
Outdated
@@ -7491,6 +7491,11 @@ msgctxt "action_report_image_to_nutripatrol" | |||
msgid "Report this image to our moderators" | |||
msgstr "Report this image to our moderators" | |||
|
|||
msgctxt "missing_value_and_or_unit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to name it missing_serving_size_value_and_or_unit.
po/common/common.pot
Outdated
@@ -7491,6 +7491,11 @@ msgctxt "action_report_image_to_nutripatrol" | |||
msgid "Report this image to our moderators" | |||
msgstr "Report this image to our moderators" | |||
|
|||
msgctxt "missing_value_and_or_unit" | |||
msgid "We are missing the serving size value and or unit to calculate the NutriScore" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``
msgid "We are missing the serving size value and or unit to calculate the NutriScore" | |
msgid "We are missing the serving size value and/or unit to calculate the Nutri-Score" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but we should add a test that show the result of your changes. For instance in test/unit/attributes.t : add a product where we have serving size nutrients, but not the serving size.
tests/unit/attributes.t
Outdated
lc => "en", | ||
categories => "biscuits", | ||
categories_tags => ["en:biscuits"], | ||
nutrition_data_per_serving => "20", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be nutrition_data_per => "serving", and then you pass serving_size => "20 g" (or "20" or nothing depending on the case you want to test)
|
What
Add an explanation for the issues that we have a wrong message when we don't have value or unit for a product
Related issue(s) and discussion