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

Fix how application.yml.example refers to locales #918

Open
tanius opened this issue Mar 30, 2020 · 0 comments
Open

Fix how application.yml.example refers to locales #918

tanius opened this issue Mar 30, 2020 · 0 comments

Comments

@tanius
Copy link

tanius commented Mar 30, 2020

Description

After the installation using the ./script/setup script, I ended up with an application.yml file derived from application.yml.example. Both contain this line:

AVAILABLE_LOCALES: en,es,en-GB

Here, the en-GB part fails to select the intended locale, and instead an English fallback locale is shown (making the failure non-obvious). To see the failure clearly, adapt this line to AVAILABLE_LOCALES: en,es,de-DE. Then, after choosing the German language in the frontend, the user interface is still shown in the English fallback locale.

Expected Behavior, Actual Behaviour

I tried to configure Open Food Network to show the user interface in German as described above, but it still shows up in English.

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: master branch, checked out 2020-03-27 at commit 940423a

Possible Fix

The issue was fixed when I provided this line in application.yml instead:

AVAILABLE_LOCALES: en,es,de_DE

The difference is that language designators with two parts must use a scheme like de_DE, not de-DE as in application.yml.example.

To fix this for real, the corresponding line in application.yml.example should be changed to be this:

AVAILABLE_LOCALES: en,es,en-GB

The requirement to do this was mentioned in comments on openfoodfoundation/openfoodnetwork#715, back in 2015, but somehow it went unnoticed since then 🙂

@sigmundpetersen sigmundpetersen transferred this issue from openfoodfoundation/openfoodnetwork Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: All the things 💤
Development

No branches or pull requests

1 participant