#! /bin/sh # get AMNESIA_SUPPORTED_LANGUAGES . config/amnesia if [ -e config/amnesia.local ] ; then . config/amnesia.local fi refresh_translations () { prog=$1 proglang=$2 sharedir="config/chroot_local-includes/usr/share/${prog}" locale_basedir="config/chroot_local-includes/usr/share/locale" pot="${sharedir}/messages.pot" mkdir -p "${sharedir}" xgettext --language="${proglang}" --from-code=UTF-8 \ -o "${pot}" \ "config/chroot_local-includes/usr/local/bin/${prog}" for locale in $AMNESIA_SUPPORTED_LANGUAGES ; do po="${locale_basedir}/${locale}/LC_MESSAGES/${prog}.po" mo="${locale_basedir}/${locale}/LC_MESSAGES/${prog}.mo" mkdir -p "${locale_basedir}/${locale}/LC_MESSAGES" [ -e "${po}" ] || cp "${pot}" "${po}" msgmerge --update "${po}" "${pot}" msgfmt -o "${mo}" "${po}" done } for prog in gpgApplet tails-security-check tails-htp-notify-user tails-virt-notify-user ; do refresh_translations $prog Perl done