6 PERL_PROGS
="/usr/local/bin/gpgApplet /usr/local/bin/tails-security-check \
7 /usr/local/bin/tails-htp-notify-user /usr/local/bin/tails-start-i2p \
8 /usr/local/bin/tails-virt-notify-user"
9 PYTHON_PROGS
="/etc/whisperback/config.py /usr/local/bin/shutdown_helper_applet \
10 /usr/local/bin/tails-about /usr/local/sbin/tails-additional-software"
11 SHELL_PROGS
="/usr/local/sbin/unsafe-browser /usr/share/tails/truecrypt-wrapper.disabled"
13 LANGUAGES
=$
(for po
in po
/*.po
; do rel
="${po%.po}" ; echo "${rel#po/}"; done)
14 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
21 progpath
="config/chroot_local-includes$prog"
22 domain
=$
(basename $prog)
23 echo "tmp/pot/${domain}.pot"
30 progpath
="config/chroot_local-includes$prog"
31 pot
=$
(prog_potfile
$prog)
33 mkdir
-p "$(dirname $pot)"
35 if [ -e "${progpath}" ]; then
36 xgettext
--language="${proglang}" --from-code=UTF-8 \
37 -o "${pot}" "${progpath}"
38 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
45 echo "po/${locale}.po"
51 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
55 for locale
in "$@" ; do
58 mkdir
-p $
(dirname "$mo")
59 msgfmt
-o "${mo}" "${po}"
63 no_left_out_files
() {
64 (cd po
&& intltool-update
--maintain)
65 [ ! -e po
/missing
] ||
return 1
69 intltool_update_pot
() {
72 intltool-update
--pot --gettext-package=tails
76 intltool_update_po
() {
79 for locale
in "$@" ; do
80 intltool-update
--dist --gettext-package=tails
$locale
86 grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po
/POTFILES.
in \
87 |
while read infile
; do
88 intltool-merge
--quiet --desktop-style --utf8 \
89 po
"$infile" "${infile%.in}"
94 (cd po
&& intltool-update
--report --gettext-package=tails
)
101 for prog
in $PERL_PROGS ; do refresh_pot
$prog Perl
; done
102 for prog
in $PYTHON_PROGS ; do refresh_pot
$prog Python
; done
103 for prog
in $SHELL_PROGS ; do refresh_pot
$prog Shell
; done
106 # If left out files are detected, intltool-update --maintain writes
107 # them to po/missing.
108 no_left_out_files ||
exit 3
111 intltool_update_po
$LANGUAGES
113 # Update files that are actually used at runtime
114 refresh_mo
$LANGUAGES