build: add i18n-sync.sh, a script to automatically sync most translations
This commit is contained in:
parent
e782a6f339
commit
3944cdaac4
1 changed files with 24 additions and 0 deletions
24
build/i18n-sync.sh
Executable file
24
build/i18n-sync.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
for m in */*/Makefile; do
|
||||
if grep -qE '^PO *=' $m; then
|
||||
p="${m%/Makefile}"
|
||||
t="$(sed -ne 's/^PO *= *//p' $m)"
|
||||
|
||||
case "$t" in
|
||||
*\ *)
|
||||
echo "WARNING: Cannot handle $p" >&2
|
||||
continue
|
||||
;;
|
||||
*base*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f "po/templates/$t.pot" ]; then
|
||||
./build/i18n-scan.pl "$p" > "po/templates/$t.pot"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
./build/i18n-update.pl po
|
Loading…
Reference in a new issue