6 PERL_PROGS
="/usr/local/bin/gpgApplet /usr/local/bin/tails-security-check \
7 /usr/local/bin/tails-htp-notify-user \
8 /usr/local/bin/tails-virt-notify-user \
9 /usr/local/sbin/tails-restricted-network-detector"
10 PYTHON_PROGS
="/etc/whisperback/config.py /usr/local/lib/shutdown-helper-applet \
11 /usr/local/bin/tails-about /usr/local/sbin/tails-additional-software"
12 SHELL_PROGS
="/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh \
13 /usr/local/bin/tails-upgrade-frontend-wrapper \
14 /usr/local/sbin/tails-spoof-mac \
15 /usr/local/sbin/tails-i2p \
16 /usr/local/sbin/i2p-browser \
17 /usr/local/bin/tor-browser \
18 /usr/local/sbin/unsafe-browser /usr/share/tails/truecrypt-wrapper.disabled"
20 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
22 ### External libraries
24 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
31 progpath
="config/chroot_local-includes$prog"
32 domain
=$
(basename $prog)
33 echo "tmp/pot/${domain}.pot"
40 progpath
="config/chroot_local-includes$prog"
41 pot
=$
(prog_potfile
$prog)
43 mkdir
-p "$(dirname $pot)"
45 if [ -e "${progpath}" ]; then
46 xgettext
--language="${proglang}" --from-code=UTF-8 \
47 -o "${pot}" "${progpath}"
48 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
55 echo "po/${locale}.po"
61 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
65 for locale
in "$@" ; do
68 mkdir
-p $
(dirname "$mo")
69 msgfmt
-o "${mo}" "${po}"
73 no_left_out_files
() {
74 (cd po
&& intltool-update
--maintain)
75 [ ! -e po
/missing
] ||
return 1
79 intltool_update_pot
() {
82 intltool-update
--pot --gettext-package=tails
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 $
(po_languages
)
114 # Update files that are actually used at runtime
115 refresh_mo $
(po_languages
)