Commit 0b39066f authored by segfault's avatar segfault
Browse files

Merge branch 'bugfix/17279-workaround-lack-of-usable-tor-transifex-branches'...

Merge branch 'bugfix/17279-workaround-lack-of-usable-tor-transifex-branches' into stable (Closes: #17279)
parents 751f169b 7194227c
...@@ -67,7 +67,8 @@ eval "$GIT_IN_TOR_TRANSLATION_DIR reset --hard \"origin/$BRANCH\"" ...@@ -67,7 +67,8 @@ eval "$GIT_IN_TOR_TRANSLATION_DIR reset --hard \"origin/$BRANCH\""
# Ensure we only keep PO files that are still present in the Transifex # Ensure we only keep PO files that are still present in the Transifex
# branch we import from. # branch we import from.
find "$TAILS_PO_DIR" -name '*.po' -delete # XXX: once #16774 is resolved, -delete these files instead.
find "$TAILS_PO_DIR" -name '*.po' -exec rename 's/$/.orig/' '{}' \;
# For each completely translated language, merge it, # For each completely translated language, merge it,
# unless it is translated outside Transifex # unless it is translated outside Transifex
...@@ -97,6 +98,23 @@ else ...@@ -97,6 +98,23 @@ else
done done
fi fi
# The _completed branches we still pull from (because the _release
# branches we need don't exist yet) are mostly empty, so avoid l10n
# regressions by keeping old PO files instead of deleting them.
#
# XXX: remove this hack once #16774 is resolved.
if echo "$BRANCH" | grep -qs -E '_completed$'; then
find "$TAILS_PO_DIR" -name '*.po.orig' -o -name '*.pot.orig' \
| while read orig_po_file; do
po_file=$(echo "$orig_po_file" | sed 's/\.orig$//')
if ! [ -e "$po_file" ]; then
echo "${po_file} was removed ⇒ restoring ${orig_po_file}"
cp "$orig_po_file" "$po_file"
fi
rm "$orig_po_file"
done
fi
# Update PO files # Update PO files
if [ -n "${AFTER_IMPORT:-}" ]; then if [ -n "${AFTER_IMPORT:-}" ]; then
eval "$AFTER_IMPORT" eval "$AFTER_IMPORT"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment