2015-11-17 23:13:30 +01:00
|
|
|
Translation
|
|
|
|
===========
|
|
|
|
|
|
|
|
run these commands in the root directory of searx
|
|
|
|
|
|
|
|
Add new language
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
|
|
|
|
|
|
|
pybabel init -i messages.pot -d searx/translations -l it
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
Update .po files
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
|
|
|
|
|
|
|
./utils/update-translations.sh
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
You may have errors here. In that case, edit the
|
|
|
|
``update-translations.sh`` script to change ``pybabel`` to
|
2016-01-21 16:30:42 +01:00
|
|
|
``pybabel-python2`` or ``pybabel2``
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
After this step, you can modify the .po files.
|
|
|
|
|
|
|
|
Compile translations
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
|
|
|
|
|
|
|
pybabel compile -d searx/translations
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
Transifex stuff
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Init Project
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. code:: shell
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
|
|
|
|
|
2015-11-17 23:13:30 +01:00
|
|
|
tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
|
|
|
|
--source-lang en --type PO --source-file messages.pot --execute
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
http://docs.transifex.com/client/init/
|
2015-11-17 23:13:30 +01:00
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
http://docs.transifex.com/client/set/
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
Get translations
|
|
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. code:: shell
|
|
|
|
|
|
|
|
tx pull -a
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
http://docs.transifex.com/client/pull
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
Upload source File
|
|
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
tx push -s
|
|
|
|
|
|
|
|
Upload all Translation
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
tx push -s -t
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
upload specifc Translation
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2015-11-17 23:13:30 +01:00
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
.. code:: shell
|
2015-11-17 23:13:30 +01:00
|
|
|
|
|
|
|
tx push -t -l tr
|
|
|
|
|
2016-01-21 16:25:40 +01:00
|
|
|
http://docs.transifex.com/client/push
|