1
0

i18n-sync.sh 507 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. [ -d ./build ] || {
  3. echo "Execute as ./build/i18n-sync.sh" >&2
  4. exit 1
  5. }
  6. [ -n "$1" ] || ./build/mkbasepot.sh
  7. find "${1:-.}" -name '*.pot' -and -not -name base.pot | \
  8. while read path; do
  9. dir="${path%/po/templates/*}"
  10. echo -n "Updating ${path#./} ... "
  11. ./build/i18n-scan.pl "$dir" > "$path"
  12. echo "done"
  13. done
  14. if [ -n "$1" ]; then
  15. find "$1" -path '*/templates/*.pot' -printf '%h ' | \
  16. xargs -r -n 1 dirname | \
  17. xargs -r -n 1 ./build/i18n-update.pl
  18. else
  19. ./build/i18n-update.pl
  20. fi