2011-03-13 09:05:19 +03:00
|
|
|
#!/bin/sh
|
2016-06-17 15:47:43 +03:00
|
|
|
|
|
|
|
# Execute this is the po/ subdir.
|
2016-04-18 06:39:07 +03:00
|
|
|
cd "$(dirname "$0")" || exit
|
2016-06-17 15:47:43 +03:00
|
|
|
|
|
|
|
echo "Updating translations via TP"
|
2011-03-13 09:05:19 +03:00
|
|
|
rsync -Lrtvz translationproject.org::tp/latest/nano/ .
|
2016-06-17 15:47:43 +03:00
|
|
|
|
|
|
|
# Are there now PO files that are not in git yet?
|
|
|
|
NEWSTUFF=$(git status --porcelain *.po | grep "^??")
|
|
|
|
|
2016-04-18 06:39:07 +03:00
|
|
|
if [ -n "${NEWSTUFF}" ]; then
|
2016-06-17 15:47:43 +03:00
|
|
|
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
|
2011-03-13 09:05:19 +03:00
|
|
|
fi
|
2016-06-17 15:47:43 +03:00
|
|
|
|
|
|
|
echo "Remerging and recompiling the PO files..."
|
|
|
|
make
|
|
|
|
|
|
|
|
#echo "Staging the files"
|
|
|
|
#git add -v nano.pot
|
|
|
|
#git add -v *.po
|
|
|
|
#git add -v LINGUAS
|