-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12651 +/- ##
==========================================
+ Coverage 46.40% 51.77% +5.37%
==========================================
Files 95 96 +1
Lines 24728 24844 +116
Branches 5922 5953 +31
==========================================
+ Hits 11474 12863 +1389
+ Misses 11700 10255 -1445
- Partials 1554 1726 +172
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



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.