6 EXCLUDE_LANGS
='fr pt_BR'
8 TOR_TRANSLATION_REMOTE
='https://git.torproject.org/translation.git'
9 TOR_TRANSLATION_DIR
='tmp/tor-translation'
10 GIT_IN_TOR_TRANSLATION_DIR
="git \
11 --work-tree=$TOR_TRANSLATION_DIR \
12 --git-dir=$TOR_TRANSLATION_DIR/.git"
14 ### External libraries
15 . config
/chroot_local-includes
/usr
/local
/lib
/tails-shell-library
/po.sh
19 echo -n "$EXCLUDE_LANGS" |
grep -qs -w "$lang"
22 # Clone or update the translation repository
23 if [ -d "$TOR_TRANSLATION_DIR" ]; then
24 $GIT_IN_TOR_TRANSLATION_DIR fetch origin
27 git clone
$TOR_TRANSLATION_REMOTE $TOR_TRANSLATION_DIR
30 # Checkout the correct branch
31 $GIT_IN_TOR_TRANSLATION_DIR checkout tails-misc_completed
32 $GIT_IN_TOR_TRANSLATION_DIR reset --hard origin
/tails-misc_completed
34 # For each completely translated language, merge it,
35 # unless it is translated outside Transifex
36 for po_file
in $TOR_TRANSLATION_DIR/*.po
; do
37 lang
=$
(basename "$po_file" |
tr - _ |
sed 's/\.po$//')
39 if ! lang_is_excluded
"$lang"; then
40 echo "Importing translation for $lang..."
41 cp "$po_file" "$TAILS_PO_DIR"
46 intltool_update_po $
(po_languages
)