Translating Liferay using Pootle
This page describes the basic steps for using Pootle to contribute translations for Liferay.
Liferay is internationalized through the definition of a set of language files in the form of java Language_<code>.properties containing keys. A Language_<code>.properties file associates each key with its value for the language denoted by <code>. Pootle can handle these files and provide a convenient UI for its manipulation.
Pootle is a tool which allows people to:
- Submit translations for keys (whether previously translated or not)
- Suggest translations, which means that key remains untranslated but there are some proposals for consideration
- Check the progress in the translation effort for a given language as well as for the whole project
- Iterate through untranslated keys or through all of them
- Review suggestions (approve/reject) as well as check some quality tests performed by Pootle
- Work in parallell for a given language/project pair
To enable this new working environment, we have written a script that seamlessly automates the information flow from VCS to Pootle and vice-versa.
To foster contributions amongst community members, we have set up the LDAP as an authentication/user sync mechanism, so that you can log in into Pootle using your liferay.com credentials.
We set up a default set of permissions so that any registered user becomes a contributor which can see the status of the translation projects and make suggestions. Some specific users hold a translator leader role which implies that, for a given language, they are able to submit translations and approve suggestions made by contributors.
Setting up the pootle account #
Liferay translation projects are available at http://translate.liferay.com. Once we log-in in Pootle (using the screen name and password from liferay.com), the first thing we should do is to configure the projects & languages we are interested in (we can return back to this page anytime). This is done through the account settings page:
Please note that, if you do not select any project, Pootle will assume that you are interested in all projects. This way you'll be aware of any new translation project.
After we've made our choices and saved, we are presented with the dashboard page, showing the projects and the available languages for each one, according to our selections:
Suggesting translations #
Any liferay.com user is a contributor which can suggest translations for later review by translator leaders. The way to proceed is as follows: from the dashboard, click on the project/language you want to contribute. You will go to the overview page where translation progress is shown:
From here you can click in the "Translate" tab or in the Language_<code>.properties link:
In this page you can see the files associated with the project/language pair. From here, you can view untranslated keys, view all keys or export the contents of Language_.properties. This option allows to work off-line on a single properties file, then upload its contents as suggestions (uploading is available from this or the previous screen).
If you choose to use the on-line Pootle interface to translate, then click on "View Untranslated" or "Translate All" links. You will go to a page with a list of keys:
As you can see, for each key, you are presented with:
- The name of property key (something-with-dashes),
- The original value of the property (that one in Language.properties),
- A text area where you can write a translation suggestion for the target language,
- Some context help located at the left side (terminology),
- Suggestions made by other users (amongst which are the automatic translations/copies)
- A Suggest button.
- A Fuzzy checkbox to indicate that you are not completely certain about the meaning of your suggestion
It is worth noting that the behavior of "next" and "previous" links depend on the link you used to reach this page: if you clicked "View Untranslated" you will navigate through all keys for which no translation exists. If you clicked "Translate All" you will navigate through all keys (useful for translators who review suggestions).
Translating a project #
Translator leaders, in addition to making suggestions, can also approve them as well as submitting translated strings. Remember that submitted translations are considered as valid values by Pootle, so they will not be available if you navigate through "View Untranslated" link.
When a translator picks one project/language pair, the translation page is a bit more complex:
For each key, a translator can view all the suggestions made by users, which can be ignored, accepted or rejected. If a suggestion is accepted (click on green check over the suggestion), the value is copied into the text area and submited automatically. If a suggestion is rejected (click on red cross over the suggestion), it is removed from the suggestion list.
In addition, the translator can submit any value for the key by pressing "submit" button anytime. Values can be resubmitted as required to make refinements on a translation. Once a key gets submitted for the first time, it contributes to the progress of the translation project.
Final remarks #
Basically, that's all you need to start contributing on Liferay translations. We will take care of periodically query Pootle to export its translations, convert them and commit into VCS. From that moment, your work will effectively become part of the product.
We are open to suggestions about this new way of translating Liferay. Please feel free to comment.