6 PERL_PROGS
="/usr/local/bin/gpgApplet /usr/local/bin/tails-security-check \
7 /usr/local/lib/tails-htp-notify-user \
8 /usr/local/lib/tails-virt-notify-user"
9 PYTHON_PROGS
="/etc/whisperback/config.py \
10 /usr/local/bin/tails-about /usr/local/sbin/tails-additional-software"
11 SHELL_PROGS
="/etc/NetworkManager/dispatcher.d/60-tor-ready.sh \
12 /usr/local/bin/electrum \
13 /usr/local/bin/icedove \
14 /usr/local/bin/tails-upgrade-frontend-wrapper \
15 /usr/local/lib/tails-spoof-mac \
16 /usr/local/sbin/tails-i2p \
17 /usr/local/sbin/i2p-browser \
18 /usr/local/bin/tor-browser \
19 /usr/local/sbin/unsafe-browser"
21 /usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js \
22 /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
25 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
27 ### External libraries
29 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
36 progpath
="config/chroot_local-includes$prog"
38 /usr
/share
/gnome-shell
/extensions
/shutdown-helper@tails.boum.org
/extension.js
)
39 domain
=shutdown-helper-extension.js
42 domain
=$
(basename $prog)
45 echo "tmp/pot/${domain}.pot"
52 progpath
="config/chroot_local-includes$prog"
53 pot
=$
(prog_potfile
$prog)
55 mkdir
-p "$(dirname $pot)"
57 if [ -e "${progpath}" ]; then
58 xgettext
--language="${proglang}" --from-code=UTF-8 \
59 -o "${pot}" "${progpath}"
60 sed -i "s@^\"Content-Type: text/plain\; charset=CHARSET\\\n\"@\"Content-Type: text/plain\; charset=UTF-8\\\n\"@" "${pot}"
67 echo "po/${locale}.po"
73 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
77 for locale
in "$@" ; do
80 mkdir
-p $
(dirname "$mo")
81 msgfmt
-o "${mo}" "${po}"
85 no_left_out_files
() {
86 (cd po
&& intltool-update
--maintain)
87 [ ! -e po
/missing
] ||
return 1
91 intltool_update_pot
() {
94 intltool-update
--pot --gettext-package=tails
99 grep -E --no-filename '[^ #]*\.(desktop|directory)\.in$' po
/POTFILES.
in \
100 |
while read infile
; do
101 intltool-merge
--quiet --desktop-style --utf8 \
102 po
"$infile" "${infile%.in}"
107 (cd po
&& intltool-update
--report --gettext-package=tails
)
114 for prog
in $PERL_PROGS ; do refresh_pot
$prog Perl
; done
115 for prog
in $PYTHON_PROGS ; do refresh_pot
$prog Python
; done
116 for prog
in $SHELL_PROGS ; do refresh_pot
$prog Shell
; done
117 for prog
in $JAVASCRIPT_PROGS ; do refresh_pot
$prog JavaScript
; done
120 # If left out files are detected, intltool-update --maintain writes
121 # them to po/missing.
122 no_left_out_files ||
exit 3
125 intltool_update_po $
(po_languages
)
127 # Update files that are actually used at runtime
128 refresh_mo $
(po_languages
)