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/bin/tails-update-frontend-wrapper \
12 /usr/local/sbin/unsafe-browser /usr/share/tails/truecrypt-wrapper.disabled"
14 LANGUAGES
=$
(for po
in po
/*.po
; do rel
="${po%.po}" ; echo "${rel#po/}"; done)
15 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
22 progpath
="config/chroot_local-includes$prog"
23 domain
=$
(basename $prog)
24 echo "tmp/pot/${domain}.pot"
31 progpath
="config/chroot_local-includes$prog"
32 pot
=$
(prog_potfile
$prog)
34 mkdir
-p "$(dirname $pot)"
36 if [ -e "${progpath}" ]; then
37 xgettext
--language="${proglang}" --from-code=UTF-8 \
38 -o "${pot}" "${progpath}"
39 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
46 echo "po/${locale}.po"
52 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
56 for locale
in "$@" ; do
59 mkdir
-p $
(dirname "$mo")
60 msgfmt
-o "${mo}" "${po}"
64 no_left_out_files
() {
65 (cd po
&& intltool-update
--maintain)
66 [ ! -e po
/missing
] ||
return 1
70 intltool_update_pot
() {
73 intltool-update
--pot --gettext-package=tails
77 intltool_update_po
() {
80 for locale
in "$@" ; do
81 intltool-update
--dist --gettext-package=tails
$locale
87 grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po
/POTFILES.
in \
88 |
while read infile
; do
89 intltool-merge
--quiet --desktop-style --utf8 \
90 po
"$infile" "${infile%.in}"
95 (cd po
&& intltool-update
--report --gettext-package=tails
)
102 for prog
in $PERL_PROGS ; do refresh_pot
$prog Perl
; done
103 for prog
in $PYTHON_PROGS ; do refresh_pot
$prog Python
; done
104 for prog
in $SHELL_PROGS ; do refresh_pot
$prog Shell
; done
107 # If left out files are detected, intltool-update --maintain writes
108 # them to po/missing.
109 no_left_out_files ||
exit 3
112 intltool_update_po
$LANGUAGES
114 # Update files that are actually used at runtime
115 refresh_mo
$LANGUAGES