From 0c256b378b9592b6e3c08c8e9ae7a36eb9568789 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jul 2021 16:19:20 +0000 Subject: [PATCH 1/2] Bump transifex-client from 0.14.2 to 0.14.3 Bumps [transifex-client](https://github.com/transifex/transifex-client) from 0.14.2 to 0.14.3. - [Release notes](https://github.com/transifex/transifex-client/releases) - [Commits](https://github.com/transifex/transifex-client/compare/0.14.2...0.14.3) --- updated-dependencies: - dependency-name: transifex-client dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 7a9405ddc..132efb257 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,7 @@ cov-core==1.15.0 pycodestyle==2.7.0 pylint==2.9.3 splinter==0.15.0 -transifex-client==0.14.2 +transifex-client==0.14.3 selenium==3.141.0 twine==3.4.1 Pallets-Sphinx-Themes==2.0.1 From debcbab561118d7f7602d77568b884d0e33f13ca Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 3 Jul 2021 19:31:31 +0200 Subject: [PATCH 2/2] [fix] add missing transifex configuration (./tx/config) BTW: update the documentation about transifex usage Signed-off-by: Markus Heiser --- .tx/config | 7 +++++++ docs/dev/translation.rst | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 .tx/config diff --git a/.tx/config b/.tx/config new file mode 100644 index 000000000..5e1f89c8a --- /dev/null +++ b/.tx/config @@ -0,0 +1,7 @@ +[main] +host = https://www.transifex.com +[searx.messagespo] +file_filter = searx/translations//LC_MESSAGES/messages.po +source_file = messages.pot +source_lang = en +type = PO diff --git a/docs/dev/translation.rst b/docs/dev/translation.rst index 86c4c843b..523dcf78c 100644 --- a/docs/dev/translation.rst +++ b/docs/dev/translation.rst @@ -12,7 +12,6 @@ Requirements ============ * Transifex account -* Installed CLI tool of Transifex Init Transifex project ====================== @@ -22,7 +21,7 @@ initialize the project. .. code:: sh - tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/ + ./manage pyenv.cmd tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/ After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it @@ -45,8 +44,9 @@ Then run ``tx set``: .. code:: shell - tx set --auto-local -r searx.messagespo 'searx/translations//LC_MESSAGES/messages.po' \ - --source-lang en --type PO --source-file messages.pot --execute + ./manage pyenv.cmd tx set --auto-local \ + -r searx.messagespo 'searx/translations//LC_MESSAGES/messages.po' \ + --source-lang en --type PO --source-file messages.pot --execute Update translations @@ -56,7 +56,8 @@ To retrieve the latest translations, pull it from Transifex. .. code:: sh - tx pull -a + ./manage pyenv.cmd tx pull -a + [?] Enter your api token: .... 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 @@ -64,7 +65,7 @@ the ``.po`` files. .. code:: shell - pybabel compile -d searx/translations + ./manage pyenv.cmd pybabel compile -d searx/translations After the compilation is finished commit the ``.po`` and ``.mo`` files and