Contributing Plone Core Translations#
Description
How to contribute to the Plone translations.
This chapter of the documentation describes how to contribute to Plone's translations. Plone fully supports internationalization and localization. Plone Classic UI comes with 65 local language translations, and the new default frontend Volto comes with 12, at the time of this writing. However, some translations are incomplete, or certain languages have not yet been added. Translations can be added or updated as needed by the citizens of Earth. You will need to work in one repository for Plone core, and optionally another one for Volto.
Prerequisites#
Request write access to collective/plone.app.locales to be able to commit your translation directly.
To do so, join the collective GitHub organization.
Optionally sign the Plone Contributor Agreement for translating Volto.
Translate Plone Classic UI#
The process of translating Plone Classic UI is the following.
Follow the instructions to set up Volto for development as described in Develop Volto core.
Create a new branch to work on your translations. Name the branch with something identifiable. For example:
{language}-{date}
(fr-20220731
).Either update or create a translation.
To update an existing translation, translate the PO files under your language of choice at
plone/app/locales/locales/{language_code}/LC_MESSAGES/*.po
. In Classic UI, we have several language files because some of the original messages are spread over several language domains and products.To create a translation, create a new directory at
plone/app/locales/locales/{language_code}/LC_MESSAGES
, copy all the.pot
files inplone/app/locales/locales
to your new directory, rename the files in your directory by changing the file extension to.po
, and start translating.
Commit your changes, and create a pull request with them. Request a review from a colleague, especially if you are translating a file that already has some translations. You can check the file's commit history with
git blame <filename>
to see previous contributors and request a review from them. This is to ensure coherent translations throughout Plone.
Translate Volto#
The process of translating the Volto frontend is the following.
Go to plone/volto and clone it into your computer.
Create a new branch to prepare the translations. Name the branch with something identifiable. For example:
{language}-{date}
(fr-20220731
).Either update or create a translation.
To update a translation, translate your language's
po
file found atlocales/{language_code}/LC_MESSAGES/volto.po
.To create a new translation, create a new directory at
locales/{language_code}/LC_MESSAGES/
, copy the filelocales/volto.pot
tolocales/{language_code}/LC_MESSAGES/volto.po
(note to drop the trailingt
), and start translating.
Run
make i18n
to convert yourpo
files intojson
. Volto loads thesejson
files to provide translated text strings in the interface.Commit your changes, and create a pull request.
Weblate for translations#
Weblate is an open source project to help software developers translate their projects. Translators can work in a web interface, and not have to install third-party software or use git or GitHub. The Plone Foundation has obtained a "gratis Libre plan" account for Plone. Plone gets free hosting at the Hosted platform that Weblate offers to open source projects.
Weblate workflow#
Translators will need to create an account on Weblate with an email and password. Authentication with GitHub and other third-party accounts might not work.
Translators can go to the Plone project in Weblate.
You will see several components listed.
The volto
component is for the package volto
, whose repository is at plone/volto.
Note
At this moment Volto translations can't be contributed using Weblate. The Volto Team are working on this issue, and hope to fix it as soon as possible.
All other components are for the package plone.app.locales
, whose repository is at collective/plone.app.locales.
See the Weblate documentation, Translating using Weblate, for how to use it to write translations.
When you save a translation, then it is committed on a branch used only for translations in the respective GitHub repository.
See recent commits to the package plone.app.locales
.
Maintainers will periodically create a pull request from the changes, and merge it.
Support#
Please ask questions on the Plone Community Forum category Translations and i18n/l10n.