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

Leverage the new deeplink to the Hunger Games Eco-Score dashboard by country #5079

Closed
teolemon opened this issue Feb 20, 2024 · 6 comments · Fixed by #5152
Closed

Leverage the new deeplink to the Hunger Games Eco-Score dashboard by country #5079

teolemon opened this issue Feb 20, 2024 · 6 comments · Fixed by #5152

Comments

@teolemon
Copy link
Member

teolemon commented Feb 20, 2024

Problem

  • We now have the ability to receive a country parameter in the Eco-Score dashboard: https://hunger.openfoodfacts.org/eco-score?cc=en%3Afrance
  • Leverage the new deeplink to the Country Eco-Score Dashboard by adding a shortcut "Help categorize products in your country" based on the current app country in "Welcome User" section.
@teolemon teolemon changed the title Leverage the new deeplink to the Country Eco-Score Dashboard Leverage the new deeplink to the Hunger Games Eco-Score dashboard by country Mar 18, 2024
@monsieurtanuki
Copy link
Contributor

@teolemon @stephanegigandet Country parameter en:france instead of fr is really a pain in the neck.

@teolemon
Copy link
Member Author

it would be more @alexfauquette

@alexfauquette
Copy link
Member

It's the id used in https://static.openfoodfacts.org/data/taxonomies/countries.json

But I could look to accept both the id and the country code with 2 letters

@monsieurtanuki
Copy link
Contributor

It's the id used in https://static.openfoodfacts.org/data/taxonomies/countries.json

But I could look to accept both the id and the country code with 2 letters

@alexfauquette If you could accept the 2-letter ISO code it would be great! The good thing is that there are no possible overlapping between both systems (en:france and fr). Please ping me when you're done with it.

For the record in openfoodfacts-dart we only use the 2-letter ISO code syntax. And we also use https://world.openfoodfacts.org/cgi/countries.pl?lc=fr (cf. issue openfoodfacts/openfoodfacts-dart#890), with 2-letter ISO code - for the language too ;)

@alexfauquette
Copy link
Member

@monsieurtanuki

This url is now working 🎉 https://hunger.openfoodfacts.org/eco-score?cc=uk

@monsieurtanuki
Copy link
Contributor

Thank you @alexfauquette!
I need to check how resilient we are with url redirections. I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants