In India, make the default unit for sodium mg instead of g on product edit form on web and mobile app #10038
Labels
good first issue
Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help.
🇮🇳 India
https://wiki.openfoodfacts.org/Local_Communities/IndianTeam/Country_Support
Nutrients
Reported by krishanti on Slack: "Please consider setting the default unit for Sodium as mg instead of grams as that is the unit commonly seen on nutrition labels. While editing products I've seen that sometimes the unit is mistakenly ignored and the nutriscore becomes inaccurate"
in the taxonomies/nutrients.txt, we can define default units for ingredients for a specific country. e.g. this states that for energy, the default unit is kj in all countries except Canada and the US:
unit:en: kj
unit_ca:en: kcal
unit_us:en: kcal
There is some code in product_multilingual.pl that then uses it to display the right unit on the product edit form on the web site:
This code should be moved to a function in Food.pm, and it should also be called in cgi/nutrients.pl so that we get the right unit for countries. /cgi/nutrients.pl is used by the OFF mobile app.
Part of
The text was updated successfully, but these errors were encountered: