1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#!/bin/sh
# If doc-check shows outdated untranslated files, this script can
# be used to copy the new English versions of these updated files
# to your translation. The script will also run rev-update for you.
# Note:
# Run doc-check before you run this script.
# It is recommended you use 'svn diff <language>' to check the
# changes made by this script before committing.
set -e
language=${1:-pl}
if [ "$1" = "--help" ]; then
echo <<HELP
Usage: $0 [<language>]
--help print this help message.
Current <language> is '$language'.
HELP
exit 0
fi
UFILES="$(./scripts/doc-check $language 2>/dev/null | \
egrep "^en\/.* \(untranslated\)$" | \
cut -d" " -f1 | cut -d"/" -f2- )"
if [ -z "$UFILES" ] ; then
echo "No updated untranslated files for language '$language' found."
exit 0
fi
for UFILE in $UFILES; do
echo "Copying $UFILE from ./en to ./$language"
cp ./en/$UFILE ./$language/$UFILE
done
echo ""
echo "Running rev-update..."
./scripts/rev-update $language
exit 0
|