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 /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/iceweasel \
14 /usr/local/bin/tails-upgrade-frontend-wrapper \
15 /usr/local/sbin/tails-spoof-mac \
16 /usr/local/sbin/unsafe-browser /usr/share/tails/truecrypt-wrapper.disabled"
18 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
20 ### External libraries
22 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
29 progpath
="config/chroot_local-includes$prog"
30 domain
=$
(basename $prog)
31 echo "tmp/pot/${domain}.pot"
38 progpath
="config/chroot_local-includes$prog"
39 pot
=$
(prog_potfile
$prog)
41 mkdir
-p "$(dirname $pot)"
43 if [ -e "${progpath}" ]; then
44 xgettext
--language="${proglang}" --from-code=UTF-8 \
45 -o "${pot}" "${progpath}"
46 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
53 echo "po/${locale}.po"
59 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
63 for locale
in "$@" ; do
66 mkdir
-p $
(dirname "$mo")
67 msgfmt
-o "${mo}" "${po}"
71 no_left_out_files
() {
72 (cd po
&& intltool-update
--maintain)
73 [ ! -e po
/missing
] ||
return 1
77 intltool_update_pot
() {
80 intltool-update
--pot --gettext-package=tails
85 grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po
/POTFILES.
in \
86 |
while read infile
; do
87 intltool-merge
--quiet --desktop-style --utf8 \
88 po
"$infile" "${infile%.in}"
93 (cd po
&& intltool-update
--report --gettext-package=tails
)
100 for prog
in $PERL_PROGS ; do refresh_pot
$prog Perl
; done
101 for prog
in $PYTHON_PROGS ; do refresh_pot
$prog Python
; done
102 for prog
in $SHELL_PROGS ; do refresh_pot
$prog Shell
; done
105 # If left out files are detected, intltool-update --maintain writes
106 # them to po/missing.
107 no_left_out_files ||
exit 3
110 intltool_update_po $
(po_languages
)
112 # Update files that are actually used at runtime
113 refresh_mo $
(po_languages
)