Skip to content

Conversation

@stephanegigandet
Copy link
Contributor

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.

@stephanegigandet stephanegigandet requested a review from a team as a code owner November 10, 2025 14:04
@github-project-automation github-project-automation bot moved this to To discuss and validate in 🍊 Open Food Facts Server issues Nov 10, 2025
@github-actions github-actions bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🗺️ Made Near Me MongoDB We have 2 mongodb collections: one for current products, and one for obsolete products 📍🏭 Packager codes https://blog.openfoodfacts.org/en/news/discover-what-food-products-are-made-near-you-with-made-near- 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling Data import WikiData We link taxonomies to Wikidata (& back) - https://wiki.openfoodfacts.org/Structured_Data/Wikidata 🕹️ Gamification 🖼️ Images product history We have kept 10 years of product revisions. This is useful to monitor edits & product improvements 🧪 tests 🪶 Apache We use Apache as a server to run Open Food Facts checkbot 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Recent changes Implemented by @hangy - https://world.openfoodfacts.org/cgi/recent_changes.pl?&page=1&page_size=25 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🍬 How much sugar https://howmuchsugar.in/ - Mini game powered by Open Food Facts data Display 👥 Users Tags update all products exports Account deletion Enabling users to delete account while preserving accountability for edits 🔐 Password Scanbot 🚦 Nutri-Score labels Nov 10, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 52.77778% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.77%. Comparing base (b813b7a) to head (ba5c78f).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/ProductOpener/Texts.pm 61.33% 23 Missing and 6 partials ⚠️
lib/ProductOpener/Routing.pm 24.13% 20 Missing and 2 partials ⚠️
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     
Flag Coverage Δ
integration-test-group-1 31.29% <52.33%> (?)
integration-test-group-2 27.17% <52.33%> (?)
integration-test-group-3 8.91% <61.03%> (?)
integration-test-group-4 10.85% <62.33%> (?)
integration-test-group-5 20.05% <52.33%> (?)
integration-test-group-6 24.91% <52.33%> (?)
integration-test-group-7 10.41% <62.82%> (?)
integration-test-group-8 8.92% <61.03%> (?)
integration-test-group-9 9.12% <62.33%> (?)
unit-test-group-1 26.41% <51.88%> (+0.06%) ⬆️
unit-test-group-2 21.89% <62.82%> (+0.07%) ⬆️
unit-test-group-3 20.59% <51.88%> (+0.09%) ⬆️
unit-test-group-4 31.21% <52.33%> (-0.05%) ⬇️
unit-test-group-5 20.18% <62.82%> (-0.17%) ⬇️
unit-test-group-6 29.45% <50.94%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Account deletion Enabling users to delete account while preserving accountability for edits 🪶 Apache We use Apache as a server to run Open Food Facts checkbot Data import Display exports 🕹️ Gamification 🍬 How much sugar https://howmuchsugar.in/ - Mini game powered by Open Food Facts data 🖼️ Images 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🗺️ Made Near Me 👮 Moderation MongoDB We have 2 mongodb collections: one for current products, and one for obsolete products multilingual products 🚦 Nutri-Score 📍🏭 Packager codes https://blog.openfoodfacts.org/en/news/discover-what-food-products-are-made-near-you-with-made-near- 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🔐 Password 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers product history We have kept 10 years of product revisions. This is useful to monitor edits & product improvements Recent changes Implemented by @hangy - https://world.openfoodfacts.org/cgi/recent_changes.pl?&page=1&page_size=25 Scanbot 🔎 Search Stores Tags 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests update all products 👥 Users WikiData We link taxonomies to Wikidata (& back) - https://wiki.openfoodfacts.org/Structured_Data/Wikidata

Projects

Status: In progress
Status: To discuss and validate
Status: In progress
Status: Todo
Status: Todo
Status: In progress
Status: In progress
Status: Todo
Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants