summaryrefslogtreecommitdiffstats
path: root/refresh-translations
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-09-12 23:41:21 +0200
committeranonym <anonym@riseup.net>2017-09-13 00:13:00 +0200
commit6e8137c924e3bb79950f4863b01a7ed675d1cd83 (patch)
tree6938b2665302288f731bd0464a362244d4cb1d1b /refresh-translations
parent2c6df192d3d8b8479c58b858e5dd20e505feda10 (diff)
Fix indentation.
Diffstat (limited to 'refresh-translations')
-rwxr-xr-xrefresh-translations144
1 files changed, 72 insertions, 72 deletions
diff --git a/refresh-translations b/refresh-translations
index d59b1c3..4c387d0 100755
--- a/refresh-translations
+++ b/refresh-translations
@@ -4,20 +4,20 @@ set -e
set -u
PERL_PROGS="/usr/local/bin/tails-security-check \
- /usr/local/lib/tails-htp-notify-user \
- /usr/local/lib/tails-virt-notify-user"
+ /usr/local/lib/tails-htp-notify-user \
+ /usr/local/lib/tails-virt-notify-user"
PYTHON_PROGS="/etc/whisperback/config.py \
- /usr/local/bin/tails-about /usr/local/sbin/tails-additional-software"
+ /usr/local/bin/tails-about /usr/local/sbin/tails-additional-software"
SHELL_PROGS="/etc/NetworkManager/dispatcher.d/60-tor-ready.sh \
- /usr/local/bin/electrum \
- /usr/local/bin/keepassx \
- /usr/local/bin/tails-upgrade-frontend-wrapper \
- /usr/local/lib/tails-spoof-mac \
- /usr/local/bin/tor-browser \
- /usr/local/sbin/unsafe-browser"
+ /usr/local/bin/electrum \
+ /usr/local/bin/keepassx \
+ /usr/local/bin/tails-upgrade-frontend-wrapper \
+ /usr/local/lib/tails-spoof-mac \
+ /usr/local/bin/tor-browser \
+ /usr/local/sbin/unsafe-browser"
JAVASCRIPT_PROGS=" \
- /usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js \
- /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
+ /usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js \
+ /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
"
LOCALE_BASEDIR=config/chroot_local-includes/usr/share/locale
@@ -33,90 +33,90 @@ normalize_pot () {
}
prog_potfile () {
- prog=$1
-
- progpath="config/chroot_local-includes$prog"
- case $prog in
- /usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js)
- domain=shutdown-helper-extension.js
- ;;
- *)
- domain=$(basename $prog)
- ;;
- esac
- echo "tmp/pot/${domain}.pot"
+ prog=$1
+
+ progpath="config/chroot_local-includes$prog"
+ case $prog in
+ /usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js)
+ domain=shutdown-helper-extension.js
+ ;;
+ *)
+ domain=$(basename $prog)
+ ;;
+ esac
+ echo "tmp/pot/${domain}.pot"
}
create_pot () {
- prog=$1
- proglang=$2
- progpath="config/chroot_local-includes${prog}"
- if [ -e "${progpath}" ]; then
- pot="$(prog_potfile "${prog}")"
- mkdir -p "$(dirname ${pot})"
- xgettext --language="${proglang}" --from-code=UTF-8 \
- -o "${pot}" "${progpath}"
- normalize_pot "${pot}"
- else
- echo "error: We are supposed to create a POT file for '${prog}'" \
- "but '${progpath}' does not exist"
- exit 1
- fi
+ prog=$1
+ proglang=$2
+ progpath="config/chroot_local-includes${prog}"
+ if [ -e "${progpath}" ]; then
+ pot="$(prog_potfile "${prog}")"
+ mkdir -p "$(dirname ${pot})"
+ xgettext --language="${proglang}" --from-code=UTF-8 \
+ -o "${pot}" "${progpath}"
+ normalize_pot "${pot}"
+ else
+ echo "error: We are supposed to create a POT file for '${prog}'" \
+ "but '${progpath}' does not exist"
+ exit 1
+ fi
}
po_file () {
- locale=$1
+ locale=$1
- echo "po/${locale}.po"
+ echo "po/${locale}.po"
}
mo_file () {
- locale=$1
+ locale=$1
- echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
+ echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
}
refresh_mo () {
- for locale in "$@" ; do
- po=$(po_file $locale)
- mo=$(mo_file $locale)
- mkdir -p $(dirname "$mo")
- msgfmt -o "${mo}" "${po}"
- done
+ for locale in "$@" ; do
+ po=$(po_file $locale)
+ mo=$(mo_file $locale)
+ mkdir -p $(dirname "$mo")
+ msgfmt -o "${mo}" "${po}"
+ done
}
no_left_out_files () {
- (cd po && intltool-update --maintain)
- [ ! -e po/missing ] || return 1
- return 0
+ (cd po && intltool-update --maintain)
+ [ ! -e po/missing ] || return 1
+ return 0
}
intltool_update_pot () {
- (
- cd po
- cp -a tails.pot tails.pot.orig
- intltool-update --pot --gettext-package=tails
- normalize_pot tails.pot tails.pot.orig
-
- if [ "${FORCE}" = yes ]; then
- echo "Force-updating 'tails.pot'."
- rm tails.pot.orig
- elif diff_without_pot_creation_date_and_comments tails.pot.orig tails.pot >/dev/null; then
- echo "Only header or comment changes in tails.pot: keeping the old one"
- mv tails.pot.orig tails.pot
- else
- echo "Real changes in tails.pot: switching to the updated one"
- rm tails.pot.orig
- fi
- )
+ (
+ cd po
+ cp -a tails.pot tails.pot.orig
+ intltool-update --pot --gettext-package=tails
+ normalize_pot tails.pot tails.pot.orig
+
+ if [ "${FORCE}" = yes ]; then
+ echo "Force-updating 'tails.pot'."
+ rm tails.pot.orig
+ elif diff_without_pot_creation_date_and_comments tails.pot.orig tails.pot >/dev/null; then
+ echo "Only header or comment changes in tails.pot: keeping the old one"
+ mv tails.pot.orig tails.pot
+ else
+ echo "Real changes in tails.pot: switching to the updated one"
+ rm tails.pot.orig
+ fi
+ )
}
intltool_merge () {
- grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po/POTFILES.in \
- | while read infile ; do
- intltool-merge --quiet --desktop-style --utf8 \
- po "$infile" "${infile%.in}"
- done
+ grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po/POTFILES.in \
+ | while read infile ; do
+ intltool-merge --quiet --desktop-style --utf8 \
+ po "$infile" "${infile%.in}"
+ done
}
### Main