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

Keep the same UI language after clicking showing products from the whole world #1437

Closed
SantosSi opened this issue Oct 23, 2018 · 3 comments · Fixed by #6669 or #6754
Closed

Keep the same UI language after clicking showing products from the whole world #1437

SantosSi opened this issue Oct 23, 2018 · 3 comments · Fixed by #6669 or #6754
Labels
good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. ⏲️ 5 minute fix

Comments

@SantosSi
Copy link
Contributor

SantosSi commented Oct 23, 2018

Summary:
https://de.openfoodfacts.org changes to https://world.openfoodfacts.org, but better would be https://world-de.openfoodfacts.org

Steps to reproduce:

  • Open https://de.openfoodfacts.org
  • Click on "Entsprechende Produkte aus der ganzen Welt ansehen" (Show respective products from the whole world)

Expected behavior:
It should show international products with labels in the language previously chosen (supposedly for good reason).

Observed behavior:
It shows international products, but with English labels.

@teolemon teolemon changed the title Continue to show non-english labeling when changing to show other products from the whole world Keep the same UI language after clicking showing products from the whole world Aug 21, 2021
@teolemon teolemon added ⏲️ 5 minute fix Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. labels Aug 21, 2021
@stephanegigandet stephanegigandet added the good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. label Mar 29, 2022
@stephanegigandet
Copy link
Contributor

Related code: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/lib/ProductOpener/Display.pm#L4035

$request_ref->{world_current_link} needs to be built with the $lc language code instead of "en", and then the subdomain needs to be world-[language code].openfoodfacts.org (e.g. world-de.openfoodfacts.org )

@Fienne
Copy link

Fienne commented Mar 30, 2022

@stephanegigandet I've gone through the whole page but couldn't find the "Entsprechende Produkte aus der ganzen Welt ansehen" (Show respective products from the whole world) sentence. So I'm unable to tackle the issue.

@alexgarel
Copy link
Member

@Fienne most of the time, we use ids for messages to handle translation. The sentence here is in "po/common/de.po" and it has id "view_products_from_the_entire_world" that you may find in the code (or a template).

But starting from the link might be difficult, because you have then to understand where the router will route the request. So @stephanegigandet already points to the right point in code. See #1437 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. ⏲️ 5 minute fix
Projects
5 participants