Updating squashfs.sort for 0.7 release.
[tails-test.git] / refresh-translations
blob57a12852b9a90a017abf92a8d86021cafd1aee1b
1 #! /bin/sh
3 # get AMNESIA_SUPPORTED_LANGUAGES
4 . config/amnesia
5 if [ -e config/amnesia.local ] ; then
6 . config/amnesia.local
7 fi
9 refresh_translations () {
10 prog=$1
11 proglang=$2
13 sharedir="config/chroot_local-includes/usr/share/${prog}"
14 locale_basedir="config/chroot_local-includes/usr/share/locale"
15 pot="${sharedir}/messages.pot"
17 mkdir -p "${sharedir}"
19 xgettext --language="${proglang}" --from-code=UTF-8 \
20 -o "${pot}" \
21 "config/chroot_local-includes/usr/local/bin/${prog}"
23 for locale in $AMNESIA_SUPPORTED_LANGUAGES ; do
24 po="${locale_basedir}/${locale}/LC_MESSAGES/${prog}.po"
25 mo="${locale_basedir}/${locale}/LC_MESSAGES/${prog}.mo"
26 mkdir -p "${locale_basedir}/${locale}/LC_MESSAGES"
27 [ -e "${po}" ] || cp "${pot}" "${po}"
28 msgmerge --update "${po}" "${pot}"
29 msgfmt -o "${mo}" "${po}"
30 done
33 for prog in tails-security-check tails-htp-notify-user tails-virt-notify-user ; do
34 refresh_translations $prog Perl
35 done
37 for prog in nautilus-sfill nautilus-wipe ; do
38 refresh_translations $prog Shell
39 done