po: correctly advertise whether new PO files have arrived
And don't bother running configure and make upstairs; here is enough.master
parent
a025878466
commit
8875acf912
|
@ -1,16 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Execute this is the po/ subdir.
|
||||
cd "$(dirname "$0")" || exit
|
||||
echo "Updating translations via TP" && \
|
||||
|
||||
echo "Updating translations via TP"
|
||||
rsync -Lrtvz translationproject.org::tp/latest/nano/ .
|
||||
git add -v *.po
|
||||
echo "Updating LINGUAS for all translations"
|
||||
FILE=LINGUAS
|
||||
echo "# List of available languages." >"${FILE}"
|
||||
echo $(printf '%s\n' *.po | LC_ALL=C sort | sed 's/\.po//g') >>"${FILE}"
|
||||
git add -v "${FILE}"
|
||||
NEWSTUFF=$(git status --porcelain *.po)
|
||||
|
||||
# Are there now PO files that are not in git yet?
|
||||
NEWSTUFF=$(git status --porcelain *.po | grep "^??")
|
||||
|
||||
if [ -n "${NEWSTUFF}" ]; then
|
||||
printf "New langs found, re-running configure and make at top level (silently)..."
|
||||
(cd .. && ./configure && make) >/dev/null
|
||||
echo "done"
|
||||
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 "Remerging and recompiling the PO files..."
|
||||
make
|
||||
|
||||
#echo "Staging the files"
|
||||
#git add -v nano.pot
|
||||
#git add -v *.po
|
||||
#git add -v LINGUAS
|
||||
|
|
Loading…
Reference in New Issue