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 \
10 config/chroot_local-includes/usr/src/iuk/bin \
11 config/chroot_local-includes/usr/src/persistence-setup/bin \
13 | perl -p -E 's{^config/chroot_local-includes}{}' \
16 config/chroot_local-includes/usr/src/iuk/lib \
17 config/chroot_local-includes/usr/src/perl5lib/lib \
18 config/chroot_local-includes/usr/src/persistence-setup/lib \
20 | perl -p -E 's{^config/chroot_local-includes}{}' \
22 PYTHON_PROGS
="/etc/whisperback/config.py \
23 /usr/local/bin/electrum \
24 /usr/local/bin/replace-su-with-sudo \
25 /usr/local/bin/tails-about \
26 /usr/local/bin/tails-additional-software-config \
27 /usr/local/bin/tails-screen-locker \
28 /usr/local/bin/tails-upgrade-frontend-wrapper \
29 /usr/local/lib/seahorse-tool-wrapper \
30 /usr/local/sbin/tails-additional-software \
31 /usr/lib/python3/dist-packages/tails_installer/creator.py \
32 /usr/lib/python3/dist-packages/tails_installer/gui.py \
33 /usr/lib/python3/dist-packages/tails_installer/source.py \
34 /usr/lib/python3/dist-packages/tails_installer/utils.py \
35 /usr/lib/python3/dist-packages/tailsgreeter/settings/persistence.py \
36 /usr/lib/python3/dist-packages/tailsgreeter/ui/add_settings_dialog.py \
37 /usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py \
38 /usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py \
39 /usr/lib/python3/dist-packages/tailsgreeter/ui/region_settings.py \
40 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume.py \
41 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_list.py \
42 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_manager.py \
43 /usr/lib/python3/dist-packages/whisperBack/exceptions.py \
44 /usr/lib/python3/dist-packages/whisperBack/gui.py \
45 /usr/lib/python3/dist-packages/whisperBack/whisperback.py \
46 /usr/local/lib/tails-additional-software-notify \
47 /usr/local/sbin/tails-additional-software"
48 SHELL_PROGS
="/etc/NetworkManager/dispatcher.d/60-tor-ready.sh \
49 /usr/local/bin/keepassxc \
50 /usr/local/lib/tails-spoof-mac \
51 /usr/local/bin/thunderbird \
52 /usr/local/bin/tor-browser \
53 /usr/local/sbin/unsafe-browser"
55 /usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js \
56 /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
59 /usr/share/tails/additional-software/configuration-window.ui \
62 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
64 ### External libraries
66 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/common.sh
67 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
72 sed --regexp-extended \
73 -i 's@^"Content-Type: text/plain; charset=CHARSET\\n"@"Content-Type: text/plain; charset=UTF-8\\n"@' \
80 progpath
="config/chroot_local-includes$prog"
82 /usr
/share
/gnome-shell
/extensions
/status-menu-helper@tails.boum.org
/extension.js
)
83 domain
=status-menu-helper-extension.js
85 /usr
/share
/gnome-shell
/extensions
/torstatus@tails.boum.org
/extension.js
)
86 domain
=torstatus-extension.js
88 /usr
/lib
/python
3/dist-packages
/unlock_veracrypt_volumes
/*)
89 domain
="unlock-veracrypt-volumes-$(basename "$prog")"
91 /usr
/lib
/python
3/dist-packages
/tailsgreeter
/*)
92 domain
="greeter-$(basename "$prog")"
94 /usr
/lib
/python
*/dist-packages
/tails_installer
/*)
95 domain
="installer-$(basename "$prog")"
97 /usr
/lib
/python
3/dist-packages
/whisperBack
/*)
98 domain
="whisperBack-$(basename "$prog")"
100 /usr
/src
/persistence-setup
/lib
/*)
101 domain
="persistence-setup-$(basename "$prog")"
104 domain
=$
(basename $prog)
107 echo "tmp/pot/${domain}.pot"
113 progpath
="config/chroot_local-includes${prog}"
114 if [ -e "${progpath}" ]; then
115 pot
="$(prog_potfile "${prog}")"
116 mkdir
-p "$(dirname ${pot})"
119 # XXX: once we can assume libintl-perl 1.28+,
120 # generate this list of options with:
121 # perl -MLocale::TextDomain -E 'print Locale::TextDomain->options'
122 xgettext_args
='--keyword'
123 xgettext_args
="$xgettext_args --keyword=__"
124 xgettext_args
="$xgettext_args --keyword='\$__'"
125 xgettext_args
="$xgettext_args --keyword=__x"
126 xgettext_args
="$xgettext_args --keyword=__n:1,2"
127 xgettext_args
="$xgettext_args --keyword=__nx:1,2"
128 xgettext_args
="$xgettext_args --keyword=__xn:1,2"
129 xgettext_args
="$xgettext_args --keyword=__p:1c,2"
130 xgettext_args
="$xgettext_args --keyword=__np:1c,2,3"
131 xgettext_args
="$xgettext_args --keyword=__npx:1c,2,3"
132 xgettext_args
="$xgettext_args --keyword=N__"
133 xgettext_args
="$xgettext_args --keyword=N__n:1,2"
134 xgettext_args
="$xgettext_args --keyword=N__p:1c,2"
135 xgettext_args
="$xgettext_args --keyword=N__np:1c,2,3"
136 xgettext_args
="$xgettext_args --keyword=%__'"
142 xgettext
--language="${proglang}" --from-code=UTF-8 \
144 --add-comments="Translators:" -o "${pot}" "${progpath}"
145 if [ -f "${pot}" ]; then
146 normalize_pot
"${pot}"
149 echo "error: We are supposed to create a POT file for '${prog}'" \
150 "but '${progpath}' does not exist"
158 echo "po/${locale}.po"
164 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
168 for locale
in "$@" ; do
169 po
=$
(po_file
$locale)
170 mo
=$
(mo_file
$locale)
171 mkdir
-p $
(dirname "$mo")
172 msgfmt
--check -o "${mo}" "${po}"
176 no_left_out_files
() {
177 (cd po
&& intltool-update
--maintain)
178 [ ! -e po
/missing
] ||
return 1
182 intltool_update_pot
() {
185 cp -a tails.pot tails.pot.orig
186 intltool-update
--pot --gettext-package=tails
187 normalize_pot tails.pot tails.pot.orig
189 if [ "${FORCE:-}" = yes ]; then
190 echo "Force-updating 'tails.pot'."
192 elif diff_without_pot_creation_date_and_comments
-q tails.pot.orig tails.pot
; then
193 echo "Only header or comment changes in tails.pot: keeping the old one"
194 mv tails.pot.orig tails.pot
196 echo "Real changes in tails.pot: switching to the updated one"
202 intltool_merge_desktop
() {
203 extract_from_file_between_markers po
/POTFILES.
in \
204 '^# Files updated by intltool-update --desktop-style' '^$' \
205 |
while read infile
; do
206 intltool-merge
--quiet --desktop-style --utf8 \
207 po
"$infile" "${infile%.in}"
211 intltool_merge_xml
() {
212 extract_from_file_between_markers po
/POTFILES.
in \
213 '^# Files updated by intltool-update --xml-style' '^$' \
214 |
while read infile
; do
215 intltool-merge
--quiet --xml-style --utf8 \
216 po
"$infile" "${infile%.in}"
224 while [ -n "${@:-}" ]; do
233 echo "Unknown option: ${1}"
241 trap "rm -fr po/*.new po/*.orig ; [ "$KEEP_TMP_POT" = yes ] || rm -fr tmp/pot" EXIT
245 for prog
in $PERL_PROGS ; do create_pot
$prog Perl
; done
246 for prog
in $PYTHON_PROGS ; do create_pot
$prog Python
; done
247 for prog
in $SHELL_PROGS ; do create_pot
$prog Shell
; done
248 for prog
in $JAVASCRIPT_PROGS ; do create_pot
$prog JavaScript
; done
249 for prog
in $GLADE_UI ; do create_pot
$prog Glade
; done
252 # If left out files are detected, intltool-update --maintain writes
253 # them to po/missing.
254 if ! no_left_out_files
; then
255 echo "E: These files should be listed in POTFILES.in or POTFILES.skip:" >&2
261 intltool_update_po $
(po_languages
)
263 # Update files that are actually used at runtime
264 refresh_mo $
(po_languages
)
265 intltool_merge_desktop
267 chmod +x config
/chroot_local-includes
/etc
/skel
/Desktop
/*.desktop