6 PERL_PROGS
="/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/electrum \
11 /usr/local/bin/replace-su-with-sudo \
12 /usr/local/bin/tails-about \
13 /usr/local/bin/tails-additional-software-config \
14 /usr/local/bin/tails-screen-locker \
15 /usr/local/bin/tails-upgrade-frontend-wrapper \
16 /usr/local/sbin/tails-additional-software \
17 /usr/local/lib/python3/dist-packages/unlock_veracrypt_volumes/volume.py \
18 /usr/local/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_list.py \
19 /usr/local/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_manager.py
20 /usr/local/lib/tails-additional-software-notify \
21 /usr/local/sbin/tails-additional-software"
22 SHELL_PROGS
="/etc/NetworkManager/dispatcher.d/60-tor-ready.sh \
23 /usr/local/bin/keepassx \
24 /usr/local/lib/tails-spoof-mac \
25 /usr/local/bin/tor-browser \
26 /usr/local/sbin/unsafe-browser"
28 /usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js \
29 /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
32 /usr/share/tails/additional-software/configuration-window.ui \
35 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
37 ### External libraries
39 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/common.sh
40 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
45 sed --regexp-extended \
46 -i 's@^"Content-Type: text/plain; charset=CHARSET\\n"@"Content-Type: text/plain; charset=UTF-8\\n"@' \
53 progpath
="config/chroot_local-includes$prog"
55 /usr
/share
/gnome-shell
/extensions
/status-menu-helper@tails.boum.org
/extension.js
)
56 domain
=status-menu-helper-extension.js
58 /usr
/share
/gnome-shell
/extensions
/torstatus@tails.boum.org
/extension.js
)
59 domain
=torstatus-extension.js
61 /usr
/local
/lib
/*/unlock_veracrypt_volumes
/*)
62 domain
="unlock-veracrypt-volumes-$(basename "$prog")"
65 domain
=$
(basename $prog)
68 echo "tmp/pot/${domain}.pot"
74 progpath
="config/chroot_local-includes${prog}"
75 if [ -e "${progpath}" ]; then
76 pot
="$(prog_potfile "${prog}")"
77 mkdir
-p "$(dirname ${pot})"
78 xgettext
--language="${proglang}" --from-code=UTF-8 \
79 --add-comments="Translators:" -o "${pot}" "${progpath}"
80 normalize_pot
"${pot}"
82 echo "error: We are supposed to create a POT file for '${prog}'" \
83 "but '${progpath}' does not exist"
91 echo "po/${locale}.po"
97 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
101 for locale
in "$@" ; do
102 po
=$
(po_file
$locale)
103 mo
=$
(mo_file
$locale)
104 mkdir
-p $
(dirname "$mo")
105 msgfmt
-o "${mo}" "${po}"
109 no_left_out_files
() {
110 (cd po
&& intltool-update
--maintain)
111 [ ! -e po
/missing
] ||
return 1
115 intltool_update_pot
() {
118 cp -a tails.pot tails.pot.orig
119 intltool-update
--pot --gettext-package=tails
120 normalize_pot tails.pot tails.pot.orig
122 if [ "${FORCE:-}" = yes ]; then
123 echo "Force-updating 'tails.pot'."
125 elif diff_without_pot_creation_date_and_comments
-q tails.pot.orig tails.pot
; then
126 echo "Only header or comment changes in tails.pot: keeping the old one"
127 mv tails.pot.orig tails.pot
129 echo "Real changes in tails.pot: switching to the updated one"
135 intltool_merge_desktop
() {
136 extract_from_file_between_markers po
/POTFILES.
in \
137 '^# Files updated by intltool-update --desktop-style' '^$' \
138 |
while read infile
; do
139 intltool-merge
--quiet --desktop-style --utf8 \
140 po
"$infile" "${infile%.in}"
144 intltool_merge_xml
() {
145 extract_from_file_between_markers po
/POTFILES.
in \
146 '^# Files updated by intltool-update --xml-style' '^$' \
147 |
while read infile
; do
148 intltool-merge
--quiet --xml-style --utf8 \
149 po
"$infile" "${infile%.in}"
157 while [ -n "${@:-}" ]; do
166 echo "Unknown option: ${1}"
174 trap "rm -fr po/*.new po/*.orig ; [ "$KEEP_TMP_POT" = yes ] || rm -fr tmp/pot" EXIT
178 for prog
in $PERL_PROGS ; do create_pot
$prog Perl
; done
179 for prog
in $PYTHON_PROGS ; do create_pot
$prog Python
; done
180 for prog
in $SHELL_PROGS ; do create_pot
$prog Shell
; done
181 for prog
in $JAVASCRIPT_PROGS ; do create_pot
$prog JavaScript
; done
182 for prog
in $GLADE_UI ; do create_pot
$prog Glade
; done
185 # If left out files are detected, intltool-update --maintain writes
186 # them to po/missing.
187 if ! no_left_out_files
; then
188 echo "E: These files should be listed in POTFILES.in or POTFILES.skip:" >&2
194 intltool_update_po $
(po_languages
)
196 # Update files that are actually used at runtime
197 refresh_mo $
(po_languages
)
198 intltool_merge_desktop
200 chmod +x config
/chroot_local-includes
/etc
/skel
/Desktop
/*.desktop