openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
635 stars 371 forks source link

Some products have a different value for lang and lc #4435

Open stephanegigandet opened 3 years ago

stephanegigandet commented 3 years ago

What

svensven commented 3 years ago

Here's another one: https://us.openfoodfacts.org/api/v0/product/4970077115289.json?rev=32 Saving it, but not deliberately changing anything language related, made them the same again: https://us.openfoodfacts.org/api/v0/product/4970077115289.json?rev=33

aleene commented 3 years ago

To copy some ideas from Slack. The query and json should be able to encode the following situation.

I would like to show my greek friend on my english device, the dutch products sold in Belgium. Any relevant information will be translated to greek.

stephanegigandet commented 3 years ago

I think the issue of the products with lc != lang comes from the import of the USDA or producers data. It can change the lc field value without changing the lang value.

aleene commented 3 years ago

In a query this would imply:

svensven commented 3 years ago

can't you already do that sort of thing with https://be-el.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=languages&tag_contains_0=contains&tag_0=en:dutch ?

Ah. it translates on the site, but not in the json.

teolemon commented 2 years ago

I clarified @stephanegigandet 's original example (that got fixed) by adding the field parameter.

github-actions[bot] commented 7 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts