summaryrefslogtreecommitdiff
path: root/searx_extra
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-08-01 10:17:14 +0200
committerAlexandre Flament <alex@al-f.net>2021-08-02 10:06:27 +0200
commit900baf2eaefcde51c6de740cde3f0a99eb2f0791 (patch)
treed8213a8a4ddf7d119424bf7eff3446e297128820 /searx_extra
parent7fa7177759d46b55b9c3684df174832496877988 (diff)
downloadsearxng-900baf2eaefcde51c6de740cde3f0a99eb2f0791.tar.gz
searxng-900baf2eaefcde51c6de740cde3f0a99eb2f0791.zip
[mod] manage - implement babel commands, drop update_translations.sh
In ./manage implement babel.*: - extract : extract messages from source files and generate POT file - update : update existing message catalogs from POT file - compile : compile translation catalogs into binary MO files Replace searx_extra/update/update_translations.sh by command: - ci.babel.update Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx_extra')
-rwxr-xr-xsearx_extra/update/update_translations.sh28
1 files changed, 0 insertions, 28 deletions
diff --git a/searx_extra/update/update_translations.sh b/searx_extra/update/update_translations.sh
deleted file mode 100755
index 9ad79149b..000000000
--- a/searx_extra/update/update_translations.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# -*- coding: utf-8; mode: sh indent-tabs-mode: nil -*-
-
-# script to easily update translation language files
-
-# add new language:
-# pybabel init -i searx/translations/messages.pot -d searx/translations -l en
-
-APP_DIR="searx"
-TRANSLATIONS="${APP_DIR}/translations"
-MESSAGES_POT="${TRANSLATIONS}/messages.pot"
-
-get_sha256() {
- echo "$(grep "msgid" "${MESSAGES_POT}" | sort | sha256sum | cut -f1 -d\ )"
-}
-
-EXISTING_SHA="$(get_sha256)"
-
-pybabel extract -F babel.cfg -o "${MESSAGES_POT}" "${APP_DIR}"
-
-if [ "$(get_sha256)" = "${EXISTING_SHA}" ]; then
- echo '[!] no changes detected, exiting']
- exit 1
-fi
-
-pybabel update -N -i "${MESSAGES_POT}" -d "${TRANSLATIONS}"
-echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'
-exit 0