on fce2d49 help sign in
searx/docs/dev/translation.rst
71 lines 1.6 kB history raw
1.. _translation:
3===========
4Translation
5===========
7.. _searx@transifex: https://www.transifex.com/asciimoo/searx/
9Translation currently takes place on `searx@transifex`_
11Requirements
12============
14* Transifex account
15* Installed CLI tool of Transifex
17Init Transifex project
18======================
20After installing ``transifex`` using pip, run the following command to
21initialize the project.
23.. code:: sh
25 tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
28After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it
29into the configuration file.
31Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
33.. code:: ini
35 [main]
36 host = https://www.transifex.com
37 [searx.messagespo]
38 file_filter = searx/translations/<lang>/LC_MESSAGES/messages.po
39 source_file = messages.pot
40 source_lang = en
41 type = PO
44Then run ``tx set``:
46.. code:: shell
48 tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
49 --source-lang en --type PO --source-file messages.pot --execute
52Update translations
53===================
55To retrieve the latest translations, pull it from Transifex.
57.. code:: sh
59 tx pull -a
61Then check the new languages. If strings translated are not enough, delete those
62folders, because those should not be compiled. Call the command below to compile
63the ``.po`` files.
65.. code:: shell
67 pybabel compile -d searx/translations
70After the compilation is finished commit the ``.po`` and ``.mo`` files and
71create a PR.