@@ -1,80 +1,61 @@
4−run these commands in the root directory of searx
4+Requirements
6−Add new language
7+ * Transifex account
9−.. code:: shell
9+ * Installed CLI tool of Transifex
11− pybabel init -i messages.pot -d searx/translations -l it
11+Init Transifex project
12+----------------------
13−Update .po files
14+After installing ``transifex`` using pip, run the following command to initialize the project.
16.. code:: shell
16.. code:: shell
18− ./utils/update-translations.sh
18+ tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
20−You may have errors here. In that case, edit the
21−``update-translations.sh`` script to change ``pybabel`` to
22−``pybabel-python2`` or ``pybabel2``
24−After this step, you can modify the .po files.
21+After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it into the configuration file.
26−Compile translations
23+Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
29.. code:: shell
25.. code:: shell
28+ host = https://www.transifex.com
31− pybabel compile -d searx/translations
30+ file_filter = searx/translations/<lang>/LC_MESSAGES/messages.po
31+ source_file = messages.pot
36−Init Project
36+Then run ``tx set``:
39.. code:: shell
38.. code:: shell
41− tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
43 tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
40 tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
44 --source-lang en --type PO --source-file messages.pot --execute
41 --source-lang en --type PO --source-file messages.pot --execute
46−http://docs.transifex.com/client/init/
48−http://docs.transifex.com/client/set/
44+Update translations
50−Get translations
47+To retrieve the latest translations, pull it from Transifex.
53.. code:: shell
49.. code:: shell
55 tx pull -a
51 tx pull -a
57−http://docs.transifex.com/client/pull
53+Then check the new languages. If strings translated are not enough, delete those folders, because
58−
54+those should not be compiled. Call the command below to compile the ``.po`` files.
66−Upload all Translation
67−^^^^^^^^^^^^^^^^^^^^^^
69.. code:: shell
56.. code:: shell
71− tx push -s -t
58+ pybabel compile -d searx/translations
73−upload specifc Translation
74−~~~~~~~~~~~~~~~~~~~~~~~~~~
80−http://docs.transifex.com/client/push
61+After the compilation is finished commit the ``.po`` and ``.mo`` files and create a PR.