-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Rearchitecture of the multilingual texts / static pages #1818
Labels
🌐 i18n
Regarding software localization
🎯 P1
static content
This lives at https://github.com/openfoodfacts/openfoodfacts-web
Comments
How do we handle character languages ? Automatic romanization ? |
We could use a simple Wordpress instance, with a system to sync pages to Crowdin. This works pretty well for the blog. |
Yes I'de really advocate to choose a CMS and either proxy it from nginx or perl, but avoid re-implementing a CMS 😬 |
teolemon
added
the
static content
This lives at https://github.com/openfoodfacts/openfoodfacts-web
label
Nov 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🌐 i18n
Regarding software localization
🎯 P1
static content
This lives at https://github.com/openfoodfacts/openfoodfacts-web
The current system to store and serve pages like
/terms-and-conditions
(https://fr.openfoodfacts.org/conditions-d-utilisation
in French) does not work very well with translated versions in many languages. Those texts are currently stored that way:This make translation difficult because the names are different, and the links to those texts (in the top bar for
/discover
and/contribute
, in the footer etc.) can be broken if the file name is translated in one place and not the other.Proposed new system:
Keep the same file name for texts, and either store them in /lang/[language code]/terms-and-conditions.html or in /lang/texts/terms-and-conditions.[language code].html (or something like that)
-> This should make it easier to generate and commit translations through Crowdin.
Use a new entry in the .po files so that we can translate the text link and url:
in fr.po:
That's it for the configuration. The code will use it to:
Turn "Conditions d'utilisation" to the
/conditions-d-utilisation
url.Make
/terms-of-use
redirect to/conditions-d-utilisation
in the correct language. (useful to keep old untranslated urls working, and to quickly find new urls)Automatically create links to Conditions d'utilisation in the menus, footer etc.
Allow texts to link to other texts with just a tag like
<text_link terms-and-conditions>
(create the full<a href=""..>..</a>
link),<text_title terms-and-conditions>
and<text_url terms-and-conditions>
Also introduce support for language variants for texts:
show terms_and_conditions.pt_BR.html for Brazil, fall back to terms_and_conditions.pt if it does not exist.
Part of
The text was updated successfully, but these errors were encountered: