on master help sign in
Merge pull request #498 from pointhi/gh-pages
fe79b63Adam Tauber
docs/dev/translation.rst+21−15
@@ -6,23 +6,29 @@ run these commands in the root directory of searx
6Add new language
6Add new language
7~~~~~~~~~~~~~~~~
7~~~~~~~~~~~~~~~~
8
8
9+.. code:: shell
10+
9−``pybabel init -i messages.pot -d searx/translations -l it``
11+ pybabel init -i messages.pot -d searx/translations -l it
10
12
11Update .po files
13Update .po files
12~~~~~~~~~~~~~~~~
14~~~~~~~~~~~~~~~~
13
15
16+.. code:: shell
17+
14−``./utils/update-translations.sh``
18+ ./utils/update-translations.sh
15
19
16You may have errors here. In that case, edit the
20You may have errors here. In that case, edit the
17``update-translations.sh`` script to change ``pybabel`` to
21``update-translations.sh`` script to change ``pybabel`` to
18−``pybabel-python2``
22+``pybabel-python2`` or ``pybabel2``
19
23
20After this step, you can modify the .po files.
24After this step, you can modify the .po files.
21
25
22Compile translations
26Compile translations
23~~~~~~~~~~~~~~~~~~~~
27~~~~~~~~~~~~~~~~~~~~
24
28
29+.. code:: shell
30+
25−``pybabel compile -d searx/translations``
31+ pybabel compile -d searx/translations
26
32
27Transifex stuff
33Transifex stuff
28~~~~~~~~~~~~~~~
34~~~~~~~~~~~~~~~
@@ -32,12 +38,14 @@ Init Project
32
38
33.. code:: shell
39.. code:: shell
34
40
41+ tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
42+
35 tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
43 tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
36 --source-lang en --type PO --source-file messages.pot --execute
44 --source-lang en --type PO --source-file messages.pot --execute
37
45
38−http://docs.transifex.com/developer/client/set
46+http://docs.transifex.com/client/init/
39
47
40−*TODO: mapping between transifex and searx*
48+http://docs.transifex.com/client/set/
41
49
42Get translations
50Get translations
43^^^^^^^^^^^^^^^^
51^^^^^^^^^^^^^^^^
@@ -46,29 +54,27 @@ Get translations
46
54
47 tx pull -a
55 tx pull -a
48
56
49−http://docs.transifex.com/developer/client/pull
57+http://docs.transifex.com/client/pull
50
58
51Upload source File
59Upload source File
52^^^^^^^^^^^^^^^^^^
60^^^^^^^^^^^^^^^^^^
53
61
54−::
62+.. code:: shell
55
63
56 tx push -s
64 tx push -s
57
65
58Upload all Translation
66Upload all Translation
59^^^^^^^^^^^^^^^^^^^^^^
67^^^^^^^^^^^^^^^^^^^^^^
60
68
61−::
69+.. code:: shell
62
70
63 tx push -s -t
71 tx push -s -t
64
72
65−upload specifc Translation (only for admins)
73+upload specifc Translation
66−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+~~~~~~~~~~~~~~~~~~~~~~~~~~
67
75
68−::
76+.. code:: shell
69
77
70 tx push -t -l tr
78 tx push -t -l tr
71
79
72−http://docs.transifex.com/developer/client/push
80+http://docs.transifex.com/client/push
73−
74−*TODO: upload empty files? (new translations)*