summaryrefslogtreecommitdiff
path: root/docs/dev/translation.rst
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2019-12-29 09:47:06 +0100
committerGitHub <noreply@github.com>2019-12-29 09:47:06 +0100
commit36e72a46192235615f63a02984ab88c70145b0ec (patch)
tree0c2e238ed8fd03a95a090692d0d761fe2ea13d79 /docs/dev/translation.rst
parentb2e1ee8d35050033b41765a2de49c0eea5f8b4b4 (diff)
parentf6d66c0f6f1d8f1f583d9000ee0123450cce8130 (diff)
Merge branch 'master' into fix-engine-spotify
Diffstat (limited to 'docs/dev/translation.rst')
-rw-r--r--docs/dev/translation.rst71
1 files changed, 71 insertions, 0 deletions
diff --git a/docs/dev/translation.rst b/docs/dev/translation.rst
new file mode 100644
index 000000000..86c4c843b
--- /dev/null
+++ b/docs/dev/translation.rst
@@ -0,0 +1,71 @@
+.. _translation:
+
+===========
+Translation
+===========
+
+.. _searx@transifex: https://www.transifex.com/asciimoo/searx/
+
+Translation currently takes place on `searx@transifex`_
+
+Requirements
+============
+
+* Transifex account
+* Installed CLI tool of Transifex
+
+Init Transifex project
+======================
+
+After installing ``transifex`` using pip, run the following command to
+initialize the project.
+
+.. code:: sh
+
+ tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
+
+
+After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it
+into the configuration file.
+
+Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
+
+.. code:: ini
+
+ [main]
+ host = https://www.transifex.com
+ [searx.messagespo]
+ file_filter = searx/translations/<lang>/LC_MESSAGES/messages.po
+ source_file = messages.pot
+ source_lang = en
+ type = PO
+
+
+Then run ``tx set``:
+
+.. code:: shell
+
+ tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
+ --source-lang en --type PO --source-file messages.pot --execute
+
+
+Update translations
+===================
+
+To retrieve the latest translations, pull it from Transifex.
+
+.. code:: sh
+
+ tx pull -a
+
+Then check the new languages. If strings translated are not enough, delete those
+folders, because those should not be compiled. Call the command below to compile
+the ``.po`` files.
+
+.. code:: shell
+
+ pybabel compile -d searx/translations
+
+
+After the compilation is finished commit the ``.po`` and ``.mo`` files and
+create a PR.