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 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
16 ### External libraries
18 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
25 progpath
="config/chroot_local-includes$prog"
26 domain
=$
(basename $prog)
27 echo "tmp/pot/${domain}.pot"
34 progpath
="config/chroot_local-includes$prog"
35 pot
=$
(prog_potfile
$prog)
37 mkdir
-p "$(dirname $pot)"
39 if [ -e "${progpath}" ]; then
40 xgettext
--language="${proglang}" --from-code=UTF-8 \
41 -o "${pot}" "${progpath}"
42 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
49 echo "po/${locale}.po"
55 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
59 for locale
in "$@" ; do
62 mkdir
-p $
(dirname "$mo")
63 msgfmt
-o "${mo}" "${po}"
67 no_left_out_files
() {
68 (cd po
&& intltool-update
--maintain)
69 [ ! -e po
/missing
] ||
return 1
73 intltool_update_pot
() {
76 intltool-update
--pot --gettext-package=tails
81 grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po
/POTFILES.
in \
82 |
while read infile
; do
83 intltool-merge
--quiet --desktop-style --utf8 \
84 po
"$infile" "${infile%.in}"
89 (cd po
&& intltool-update
--report --gettext-package=tails
)
96 for prog
in $PERL_PROGS ; do refresh_pot
$prog Perl
; done
97 for prog
in $PYTHON_PROGS ; do refresh_pot
$prog Python
; done
98 for prog
in $SHELL_PROGS ; do refresh_pot
$prog Shell
; done
101 # If left out files are detected, intltool-update --maintain writes
102 # them to po/missing.
103 no_left_out_files ||
exit 3
106 intltool_update_po $
(po_languages
)
108 # Update files that are actually used at runtime
109 refresh_mo $
(po_languages
)