-
-
Notifications
You must be signed in to change notification settings - Fork 481
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 Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11998 +/- ##
==========================================
+ Coverage 49.88% 52.10% +2.21%
==========================================
Files 83 90 +7
Lines 22984 24057 +1073
Branches 5508 5782 +274
==========================================
+ Hits 11466 12535 +1069
+ Misses 10121 9903 -218
- Partials 1397 1619 +222 ☔ 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)
|
I wrongly suggested to add a test in attributes.t : the change you made is not visible in attributes, only in the knowledge panels... |
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