diff options
author | lovetox <philipp@hoerist.com> | 2022-04-20 00:44:20 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-04-21 01:17:03 +0300 |
commit | 38c779a198927e9dc224f2f28dbafded4b2dcf27 (patch) | |
tree | f355c635c9dac6c09cf173de180094c020ba4c99 | |
parent | fd9202b260f434383c5d0c41bff59e475a76ae0d (diff) |
Remove obsolete script
-rwxr-xr-x | scripts/plugins_translate | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/scripts/plugins_translate b/scripts/plugins_translate deleted file mode 100755 index f1f3345..0000000 --- a/scripts/plugins_translate +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -PYFILES=$(find -L ../ -type f -name "*.py") -GLADEFILES=$(find -L ../ -type f -name "*.ui") - - -check_args() -{ - if [ $# -ne 2 ]; then - echo "Missing lang argument" >&2 - exit 4 - fi -} - -make_pot() -{ - # Generate .ui.h - find -L ../ -type f -name "*.ui" -exec intltool-extract --type="gettext/glade" {} \; - xgettext -k_ -kN_ -o plugins_translations.pot $PYFILES $GLADEHFILES --from-code=utf-8 - rm $GLADEHFILES -} - -make_po() -{ - if [ -f $1.po ]; then - echo "Updating '$1' language"; - msgmerge -U $1.po plugins_translations.pot; - else - msginit -l $1.UTF-8 -o $1.po; - fi -} - -make_mo() -{ - if [ ! -f $1.po ]; then - echo "$1.po doesn't exist. Use plugins_translation make_po $1 to create it."; - exit 3 - fi - mkdir -p locale/$1/LC_MESSAGES - msgfmt -o $1.mo $1.po -} - -install_mo() -{ - cp $1.mo ../plugins_translations/ - mkdir -p ~/.local/share/gajim/plugins/locale/$1/LC_MESSAGES/ - cp $1.mo ~/.local/share/gajim/plugins/locale/$1/LC_MESSAGES/gajim_plugins.mo -} - - -case "$1" in - make_po) - check_args $@ - make_pot - make_po $2 - ;; - make_mo) - check_args $@ - make_mo $2 - ;; - install_mo) - install_mo $2 - ;; - all) - check_args $@ - make_pot - make_po $2 - make_mo $2 - install_mo $2 - ;; - *) - echo "Usage: plugins_translation {all|make_po|make_mo|install_mo}" >&2 - echo "example: plugins_translation make_po fr_FR" - exit 2 - ;; -esac |