2012-06-27 18:02:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-04-20 08:17:23 +00:00
|
|
|
[ -d ./build ] || {
|
|
|
|
echo "Execute as ./build/i18n-sync.sh" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
2012-06-27 18:02:50 +00:00
|
|
|
|
2021-07-18 18:12:12 +00:00
|
|
|
[ -n "$1" ] || ./build/mkbasepot.sh
|
2012-06-27 18:02:50 +00:00
|
|
|
|
2021-07-18 18:12:12 +00:00
|
|
|
find "${1:-.}" -name '*.pot' -and -not -name base.pot | \
|
2015-04-20 08:17:23 +00:00
|
|
|
while read path; do
|
|
|
|
dir="${path%/po/templates/*}"
|
|
|
|
echo -n "Updating ${path#./} ... "
|
|
|
|
./build/i18n-scan.pl "$dir" > "$path"
|
|
|
|
echo "done"
|
|
|
|
done
|
2012-06-27 18:02:50 +00:00
|
|
|
|
2021-07-22 14:31:43 +00:00
|
|
|
if [ -n "$1" ]; then
|
|
|
|
find "$1" -path '*/templates/*.pot' -printf '%h ' | \
|
|
|
|
xargs -r -n 1 dirname | \
|
|
|
|
xargs -r -n 1 ./build/i18n-update.pl
|
|
|
|
else
|
|
|
|
./build/i18n-update.pl
|
|
|
|
fi
|