6 PERL_PROGS
="/usr/local/bin/tails-security-check \
7 /usr/local/lib/tails-htp-notify-user \
9 config/chroot_local-includes/usr/src/iuk/bin \
11 | perl -p -E 's{^config/chroot_local-includes}{}' \
14 config/chroot_local-includes/usr/src/iuk/lib \
15 config/chroot_local-includes/usr/src/perl5lib/lib \
16 -type f -name '*.pm' \
17 | perl -p -E 's{^config/chroot_local-includes}{}' \
20 /usr/local/bin/electrum \
21 /usr/local/bin/replace-su-with-sudo \
22 /usr/local/bin/tails-about \
23 /usr/local/bin/tails-additional-software-config \
24 /usr/local/bin/tails-screen-locker \
25 /usr/local/bin/tails-upgrade-frontend-wrapper \
26 /usr/lib/python3/dist-packages/additional_software.py \
27 /usr/lib/python3/dist-packages/tails_installer/creator.py \
28 /usr/lib/python3/dist-packages/tails_installer/gui.py \
29 /usr/lib/python3/dist-packages/tails_installer/passphrase_dialog.py \
30 /usr/lib/python3/dist-packages/tails_installer/source.py \
31 /usr/lib/python3/dist-packages/tails_installer/utils.py \
32 /usr/lib/python3/dist-packages/tailsgreeter/settings/persistence.py \
33 /usr/lib/python3/dist-packages/tailsgreeter/ui/add_settings_dialog.py \
34 /usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py \
35 /usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py \
36 /usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py \
37 /usr/lib/python3/dist-packages/tailsgreeter/ui/region_settings.py \
38 /usr/lib/python3/dist-packages/tca/config.py \
39 /usr/lib/python3/dist-packages/tca/ui/main_window.py \
40 /usr/lib/python3/dist-packages/tps/configuration/binding.py \
41 /usr/lib/python3/dist-packages/tps/device.py \
42 /usr/lib/python3/dist-packages/tps_frontend/application.py \
43 /usr/lib/python3/dist-packages/tps_frontend/change_passphrase_dialog.py \
44 /usr/lib/python3/dist-packages/tps_frontend/error_dialog.py \
45 /usr/lib/python3/dist-packages/tps_frontend/feature.py \
46 /usr/lib/python3/dist-packages/tps_frontend/passphrase_strength_hint.py \
47 /usr/lib/python3/dist-packages/tps_frontend/views/features_view.py \
48 /usr/lib/python3/dist-packages/tps_frontend/window.py \
49 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume.py \
50 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_list.py \
51 /usr/lib/python3/dist-packages/unlock_veracrypt_volumes/volume_manager.py \
52 /usr/lib/python3/dist-packages/whisperBack/exceptions.py \
53 /usr/lib/python3/dist-packages/whisperBack/gui.py \
54 /usr/lib/python3/dist-packages/whisperBack/whisperback.py \
55 /usr/local/lib/additional-software/asp-handle-package-changes \
56 /usr/local/lib/additional-software/asp-install \
57 /usr/local/lib/tails-additional-software-notify \
58 /usr/local/lib/tails-virt-notify-user"
60 /usr/local/bin/keepassxc \
62 /usr/local/lib/tails-spoof-mac \
63 /usr/local/lib/tails-report-disk-ioerrors \
64 /usr/local/lib/tails-report-disk-resize-errors \
65 /usr/local/bin/thunderbird \
66 /usr/bin/tor-browser \
67 /usr/local/sbin/unsafe-browser"
69 /usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js \
70 /usr/share/gnome-shell/extensions/torstatus@tails.boum.org/extension.js \
73 /usr/share/tails/additional-software/configuration-window.ui \
76 LOCALE_BASEDIR
=config
/chroot_local-includes
/usr
/share
/locale
78 ### External libraries
80 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/common.sh
81 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
86 sed --regexp-extended \
87 -i 's@^"Content-Type: text/plain; charset=CHARSET\\n"@"Content-Type: text/plain; charset=UTF-8\\n"@' \
94 progpath
="config/chroot_local-includes$prog"
96 /usr
/share
/gnome-shell
/extensions
/status-menu-helper@tails.boum.org
/extension.js
)
97 domain
=status-menu-helper-extension.js
99 /usr
/share
/gnome-shell
/extensions
/torstatus@tails.boum.org
/extension.js
)
100 domain
=torstatus-extension.js
102 /usr
/lib
/python
3/dist-packages
/tps
/*)
103 domain
="tps-$(basename "$prog")"
105 /usr
/lib
/python
3/dist-packages
/tps_frontend
/*)
106 domain
="tps-frontend-$(basename "$prog")"
108 /usr
/lib
/python
3/dist-packages
/unlock_veracrypt_volumes
/*)
109 domain
="unlock-veracrypt-volumes-$(basename "$prog")"
111 /usr
/lib
/python
3/dist-packages
/tailsgreeter
/*)
112 domain
="greeter-$(basename "$prog")"
114 /usr
/lib
/python
*/dist-packages
/tails_installer
/*)
115 domain
="installer-$(basename "$prog")"
117 /usr
/lib
/python
*/dist-packages
/tca
/*)
118 domain
="tca-$(basename "$prog")"
123 /usr
/lib
/python
3/dist-packages
/whisperBack
/*)
124 domain
="whisperBack-$(basename "$prog")"
127 domain
=$
(basename "$prog")
130 echo "tmp/pot/${domain}.pot"
136 progpath
="config/chroot_local-includes${prog}"
137 if [ -e "${progpath}" ]; then
138 pot
="$(prog_potfile "${prog}")"
139 mkdir
-p "$(dirname "${pot}")"
142 # XXX: once we can assume libintl-perl 1.28+,
143 # generate this list of options with:
144 # perl -MLocale::TextDomain -E 'print Locale::TextDomain->options'
145 xgettext_args
='--keyword'
146 xgettext_args
="$xgettext_args --keyword=__"
147 xgettext_args
="$xgettext_args --keyword='\$__'"
148 xgettext_args
="$xgettext_args --keyword=__x"
149 xgettext_args
="$xgettext_args --keyword=__n:1,2"
150 xgettext_args
="$xgettext_args --keyword=__nx:1,2"
151 xgettext_args
="$xgettext_args --keyword=__xn:1,2"
152 xgettext_args
="$xgettext_args --keyword=__p:1c,2"
153 xgettext_args
="$xgettext_args --keyword=__np:1c,2,3"
154 xgettext_args
="$xgettext_args --keyword=__npx:1c,2,3"
155 xgettext_args
="$xgettext_args --keyword=N__"
156 xgettext_args
="$xgettext_args --keyword=N__n:1,2"
157 xgettext_args
="$xgettext_args --keyword=N__p:1c,2"
158 xgettext_args
="$xgettext_args --keyword=N__np:1c,2,3"
159 xgettext_args
="$xgettext_args --keyword=%__'"
165 # shellcheck disable=SC2086
166 xgettext
--language="${proglang}" --from-code=UTF-8 \
168 --add-comments="Translators:" -o "${pot}" "${progpath}"
169 if [ -f "${pot}" ]; then
170 normalize_pot
"${pot}"
173 echo "error: We are supposed to create a POT file for '${prog}'" \
174 "but '${progpath}' does not exist"
182 echo "po/${locale}.po"
188 echo "${LOCALE_BASEDIR}/${locale}/LC_MESSAGES/tails.mo"
192 for locale
in "$@" ; do
193 po
=$
(po_file
"$locale")
194 mo
=$
(mo_file
"$locale")
195 mkdir
-p "$(dirname "$mo")"
196 if ! msgfmt
--check -o "${mo}" "${po}"; then
197 echo "Errors for locale '${locale}': restoring old file"
198 if [ -n "$(git ls-files "${po}")" ]; then
200 msgfmt
--check -o "${mo}" "${po}"
208 no_left_out_files
() {
209 (cd po
&& intltool-update
--maintain)
210 [ ! -e po
/missing
] ||
return 1
214 intltool_update_pot
() {
217 cp -a tails.pot tails.pot.orig
218 intltool-update
--pot --gettext-package=tails
219 normalize_pot tails.pot tails.pot.orig
221 if [ "${FORCE:-}" = yes ]; then
222 echo "Force-updating 'tails.pot'."
224 elif diff_without_pot_creation_date_and_comments
-q tails.pot.orig tails.pot
; then
225 echo "Only header or comment changes in tails.pot: keeping the old one"
226 mv tails.pot.orig tails.pot
228 echo "Real changes in tails.pot: switching to the updated one"
234 intltool_merge_desktop
() {
235 extract_from_file_between_markers po
/POTFILES.
in \
236 '^# Files updated by intltool-merge --desktop-style' '^$' \
237 |
while read -r infile
; do
238 intltool-merge
--quiet --desktop-style --utf8 \
239 po
"$infile" "${infile%.in}"
243 intltool_merge_xml
() {
244 extract_from_file_between_markers po
/POTFILES.
in \
245 '^# Files updated by intltool-merge --xml-style' '^$' \
246 |
while read -r infile
; do
247 intltool-merge
--quiet --xml-style --utf8 \
248 po
"$infile" "${infile%.in}"
256 while [ -n "${1:-}" ]; do
265 echo "Unknown option: ${1}"
273 # shellcheck disable=SC2064
274 trap "rm -fr po/*.new po/*.orig ; [ '$KEEP_TMP_POT' = yes ] || rm -fr tmp/pot" EXIT
275 trap "echo refresh-translations: failed" ERR
279 for prog
in $PERL_PROGS ; do create_pot
"$prog" Perl
; done
280 for prog
in $PYTHON_PROGS ; do create_pot
"$prog" Python
; done
281 for prog
in $SHELL_PROGS ; do create_pot
"$prog" Shell
; done
282 for prog
in $JAVASCRIPT_PROGS ; do create_pot
"$prog" JavaScript
; done
283 for prog
in $GLADE_UI ; do create_pot
"$prog" Glade
; done
286 # If left out files are detected, intltool-update --maintain writes
287 # them to po/missing.
288 if ! no_left_out_files
; then
289 echo "E: These files should be listed in POTFILES.in or POTFILES.skip:" >&2
295 # shellcheck disable=SC2046
296 intltool_update_po $
(po_languages
)
298 # Update files that are actually used at runtime
299 # shellcheck disable=SC2046
300 refresh_mo $
(po_languages
)
301 intltool_merge_desktop