-
-
Notifications
You must be signed in to change notification settings - Fork 506
fix: automatic routing for translated text routes #12651
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
Conversation
Co-authored-by: Alex Garel <[email protected]>
Co-authored-by: Alex Garel <[email protected]>
|
alexgarel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool !
|
@alexgarel @stephanegigandet We will need to solve Donations, to ensure we always serve the translated pages: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/conf/nginx/snippets/off.locations-redirects.include |
|



This PR improves the routing of text pages so that translated text routes in .po files (e.g /discover and /conditions-d-utilisation in French) are matched with the corresponding /lang/fr/discover.html text.
Note: openfoodfacts-web currently has links or translated file names ( https://github.com/openfoodfacts/openfoodfacts-web/tree/main/lang/fr/texts/ ). Those should be removed.
This PR replaces #12644
Also renamed Index.pm to Texts.pm (clearer) and added some docs and a couple of tests.