nano/po/update_linguas.sh
Benno Schulenberg 8fef94cd7d po: make the linguas script regenerate the POT file
So we don't have to remember its awkward target name.
2016-06-27 10:58:47 +02:00

20 lines
575 B
Bash
Executable File

#!/bin/sh
# Let this be executed in the po/ subdir.
cd "$(dirname "$0")" || exit
echo "Updating translations via TP"
rsync -Lrtvz translationproject.org::tp/latest/nano/ .
# Are there now PO files that are not in git yet?
NEWSTUFF=$(git status --porcelain *.po | grep "^??")
if [ -n "${NEWSTUFF}" ]; then
echo "New languages found; updating LINGUAS"
echo "# List of available languages." >LINGUAS
echo $(printf '%s\n' *.po | LC_ALL=C sort | sed 's/\.po//g') >>LINGUAS
fi
echo "Regenerating POT file and remerging and recompiling PO files..."
make update-po