openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
826 stars 277 forks source link

Wrong image opened in the photo viewer #4188

Open g123k opened 1 year ago

g123k commented 1 year ago

Hi everyone,

It seems there is a "trou dans la raquette" (I'm not sure about the translation of this 🤭), in the multilanguage. The language of my device is English (and my country is set to the US). I have a product (barcode = 3124480184337) where the photo is only available in French, it's OK on the generic viewer page, but not on the photo viewer.

Better than words, here is a video: Bug.webm

monsieurtanuki commented 1 year ago

@g123k At the product level, we display the best possible image (maybe not in the same language). At the edit image level, we display the image that matches the explicit language.

g123k commented 1 year ago

@g123k At the product level, we display the best possible image (maybe not in the same language). At the edit image level, we display the image that matches the explicit language.

I think we should use the same algorithm on both pages because as I user I don't understand why the image changes between the two screens. (I don't know which one is better, but we also need here to be consistent)

monsieurtanuki commented 1 year ago

I'd be happy to see how this can be solved. And there will be inconsistency anyway (but a different one).

There is currently as little inconsistency as possible. Especially given that the users that edit pictures may probably be considered as "advanced". In general, when something is wrong I don't want it to be hidden: if I cannot see an image at the edit level, I would ask myself why and would be able to detect that it's related with the language (and we even display different messages in different cases: "no image at all for this field" and "no image for this field and this language")

Generally speaking, it looks like something does not work perfectly with images and languages (cf. #4183 #4176 #4165 #4140 #3919). Please take into consideration all those issues when you suggest solution - and please explain your views in comments in github before any code so that can check how the solution matches the other related issues.

g123k commented 1 year ago

Ok I totally understand your point here @monsieurtanuki. This is more like a product level question, any advice on this @teolemon?