mirror of
https://github.com/searxng/searxng.git
synced 2024-11-30 06:31:04 +00:00
e9fff4fde6
Normalize reST sources with best practice and KISS in mind. to name a few points: - simplify reST tables - make use of ``literal`` markup for monospace rendering - fix code-blocks for better rendering in HTML - normalize section header markup - limit all lines to a maximum of 79 characters - add option -H to the sudo command used in code blocks - drop useless indentation of lists - ... [1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
71 lines
1.5 KiB
ReStructuredText
71 lines
1.5 KiB
ReStructuredText
.. _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.
|