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: some translations moved from .po files to Config.pm #10294

Merged
merged 3 commits into from
May 14, 2024

Conversation

stephanegigandet
Copy link
Contributor

Some translations (that were not really translation but more configuration) were moved from .po files to Config_*.pm
Unfortunately one of the translations removed from .po file "site_name" was the one used to compute the structure that maps country codes to languages, which meant that requests on the fr. subdomain didn't get the French language, and it broke quite a few things downstream.

The tests were passing before the last Crowdin PR as I removed the strings from common.pot but not from all the .po files.

Also a few issues related to some of the other moved translations.

@stephanegigandet stephanegigandet requested a review from a team as a code owner May 13, 2024 18:00
@github-actions github-actions bot added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🧪 tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. Display 👥 Users Tags lang 📨 Mail config 🧪 integration tests Site layout 🔎 Search labels May 13, 2024
@@ -1322,7 +1322,7 @@
{
"element_type" : "text",
"text_element" : {
"html" : "\n If the information does not match the information on the packaging, please complete or correct it.\n Open Food Facts is a collaborative database, and every contribution is useful for all.\n "
"html" : "\n Si les informations ne correspondent pas à celles figurant sur l'emballage, vous pouvez les compléter ou les corriger. Merci!\n Open Food Facts est une base de données collaborative, et chaque contribution est utile pour tous.\n "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand why these expected results are changing to French. Did you maybe set a language code to test something else and forget to set it back when you re-created the test results?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@john-gom Good catch. For some reason the translation PR #10125 removed some new English translations in po/common/en.po : https://github.com/openfoodfacts/openfoodfacts-server/pull/10125/files#diff-5bbd72255d2cf6bb1099c86f8cbb873e9007d13e3357d1b43908f1b97c880c03 cc @teolemon

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the missing English translations in Crowdin, and I will add them back manually in en.po

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beware about duplicated strings.

Copy link

sonarcloud bot commented May 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@stephanegigandet stephanegigandet merged commit 9bcbea7 into main May 14, 2024
13 checks passed
@stephanegigandet stephanegigandet deleted the fix_flavor_lang branch May 14, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) config Display 🧪 integration tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels lang 📨 Mail 🔎 Search Site layout Tags Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests 🌐 Translations 👥 Users
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants