Permalink
Switch branches/tags
debian/2.10.0+rc4 debian/2.10.0+rc3 debian/2.10.0+rc2 debian/2.10.0+rc1 debian/2.10.0+rc0 debian/2.8.1+rc0 debian/2.8.0+thefinal0 debian/2.8.0+rc13 debian/2.8.0+rc12 debian/2.8.0+rc11 debian/2.8.0+rc10 debian/2.8.0+rc9 debian/2.8.0+rc8 debian/2.8.0+rc7 debian/2.8.0+rc6 debian/2.8.0+rc5 debian/2.8.0+rc4 debian/2.8.0+rc3 debian/2.8.0+rc2 debian/2.8.0+rc1 debian/2.8.0+rc0 debian/2.7.5+dev20180124154147 debian/2.7.5+dev20180123112419 debian/2.7.4+dev20171114153121 debian/2.7.2+dev20171013181704 debian/2.7.1+dev20171013111656 debian/2.7.0+thefinal0 debian/2.6.3+thefinal0 debian/2.6.2+thefinal0 debian/2.6.1+thefinal0 debian/2.6.0+thefinal0 debian/2.6.0+rc1 debian/2.6.0+beta1 debian/2.6.0+alpha1 debian/2.5.15+thefinal0 debian/2.5.14+thefinal0 debian/2.5.13+thefinal0 debian/2.5.12+thefinal0 debian/2.5.11+thefinal0 debian/2.5.10+thefinal0 debian/2.5.9+thefinal5 debian/2.5.9+thefinal4 debian/2.5.9+thefinal3 debian/2.5.9+thefinal2 debian/2.5.9+thefinal1 debian/2.5.9+thefinal0 debian/2.5.9+dev20170116091118 debian/2.5.7+thefinal0 debian/2.5.6+thefinal0 debian/2.5.5+thefinal0 debian/2.5.4+thefinal0 debian/2.5.3+thefinal0 debian/2.5.2+thefinal0 debian/2.5.1+thefinal0 debian/2.5.0+thefinal0 debian/2.4.1+thefinal1 debian/2.4.0+thefinal0 debian/2.4.0+rc4 debian/2.4.0+rc3 debian/2.4.0+rc2 debian/2.4.0+rc1 debian/2.4.0+dev20141024171719 debian/2.4.0+beta28 debian/2.4.0+beta27 debian/2.4.0+beta26 debian/2.4.0+beta25 debian/2.4.0+beta24 debian/2.4.0+beta23 debian/2.4.0+beta22 debian/2.4.0+beta21 debian/2.4.0+beta20 debian/2.4.0+beta19 debian/2.4.0+beta18 debian/2.4.0+beta17 debian/2.4.0+beta16 debian/2.4.0+beta15 debian/2.4.0+beta14 debian/2.4.0+beta13 debian/2.4.0+beta12 debian/2.4.0+beta11 debian/2.4.0+beta10 debian/2.4.0+beta9 debian/2.4.0+beta8 debian/2.4.0+beta7 debian/2.4.0+beta6 debian/2.4.0+beta5 debian/2.4.0+beta4 debian/2.4.0+beta3 debian/2.4.0+beta2 debian/2.4.0+beta1 debian/2.4.0+alpha38 debian/2.4.0+alpha37 debian/2.4.0+alpha36 debian/2.4.0+alpha35 debian/2.4.0+alpha34 debian/2.4.0+alpha33 debian/2.4.0+alpha32 debian/2.4.0+alpha31 debian/2.4.0+alpha30 debian/2.4.0+alpha29
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
127 lines (72 sloc) 5.18 KB
.. _contrib_trans:
==========================================
How to contribute to GeoNode's translation
==========================================
Everyone is welcome to contribute to the GeoNode's translation. There are two different ways to translate the GeoNode user interface: you can use the `Transifex <https://www.transifex.com/geonode/geonode/>`_ web application or you can edit the translation files on your local machine using Git and send Pull Requests (PR) to the GeoNode repository.
Edit translations using Transifex
=================================
The first workflow for contributing to GeoNode's translation is by using Transifex. In this step you will see how to update the translations directly on the Transifex website.
#. Create account
Go to `<https://www.transifex.com>`_ and, click *Try it for free* and enter the needed information to create your free account
.. figure:: img/transifex_homepage.png
#. Join our project
After activating the link you've got in your email, you will be asked whether you want to start a new project or to join an existing project
.. figure:: img/transifex_join_project.png
Click *join an existing project* and type *geonode* into the search bar. Select the GeoNode project from the GeoNode organization (not the other ones!). You will be directed to the GeoNode project site on transifex. To join the team, click on the *Join team* button, then click on the language you want to add a translation in.
#. Wait for permission to update translations from translation leader (email)
#. Start a translation
Click on the *Translate* button, then select the language where you want to add a translation
.. figure:: img/transifex_start.png
You'll see two main translation areas: *javascript* and *master*. Choose the one you want to add a translation and you'll see an interface like this
.. figure:: img/transifex_interface.png
Click *untranslated* and add your translation like shown below
.. figure:: img/transifex_add_translation.png
When you stop translating, do not forget to hit the green *save* button at the top right!
#. See the strings translated in GeoNode
In order to see the strings translated in your GeoNode instance, you will need to synchronize your GeoNode instance with what it is in Transifex. For this purpose the best workflow it is to wait that a Transifex maintainer (see below section) will pull the files from Transifex, run the `makemessages` and `compilemessages` and finally send a PR to the GeoNode official repository.
Or you can follow the following step, which uses github and does not require the help from a Transifex maintainer.
Translate on local machine from github
======================================
The second workflow for contributing to GeoNode's translation is by translating the files on your local machine and send the translation to the GeoNode official repository in GitHub with pull requests.
Using this option it is assumed that you have a local Geonode GitHub repository forked.
.. note:: It is recommended to first create a new branch e.g. *translation* in your repository for your translations.
#. As a first step, generate all of the needed .pot files (any time the master documentation changes)::
$ cd docs
$ sphinx-build -b gettext . i18n/pot
#. Run the pre_translate.sh script to generate/merge (update) all of the .po files for each language::
$ sh i18n/scripts/pre_translate.sh
#. Do a pull from Transifex to get latest translations::
$ tx pull -a
#. Now edit the .po files you need, make the translations and then run the post_translate.sh script::
$ vi i18n/it/LC_MESSAGES/index.po
$ sh i18n/scripts/post_translate.sh
#. Now you have to push the changed .po files and the appropriate .pot file (can be found in geonode/docs/i18n/pot) to your remote repository using::
$ git commit
$ git push
#. Now make a pull request and GeoNode will push your changes to Transifex and include them in its official repository.
Only for transifex maintainers
==============================
.. note:: This section is only for the maintainers of a transifex group!
For main Geonode localization files
-----------------------------------
These files are generated using standard django-admin tools : makemessages and compilemessages command line tools.
At first make sure to install Transifex client and configure your .transifexrc with our credentials as::
[https://www.transifex.com]
username = YOURUSERNAME
token =
password = PUTYOURPW
hostname = https://www.transifex.com
To prepare the PR in your branch, execute following steps.
First go to the [yourpath]/geonode/geonode/ subdirectory and get all translations from transifex.com and force their replacement::
$ tx pull -a -s -f
Then update the messages in the po and compile the corresponding mo::
$ geonode makemessages --all
$ geonode makemessages -d djangojs --all
$ geonode compiliemessages
Now you can send the PR to GeoNode GitHub repository.
Finally update resources on transifex.com::
$ tx push -s -t
How to add a new language
=========================
To add a new language, click on *Request language* on the right top of the Transifex webpage.
.. figure:: img/transifex_request_language.png