updatepo.sh 519 B

1234567891011121314151617181920212223
  1. #! /bin/bash
  2. # To create a new translation:
  3. # msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
  4. cd "$(dirname "${BASH_SOURCE[0]}")/..";
  5. # Extract translatable strings.
  6. xgettext --from-code=UTF-8 \
  7. --keyword=S \
  8. --keyword=NS:1,2 \
  9. --keyword=N_ \
  10. --add-comments='Translators:' \
  11. --add-location=file \
  12. -o locale/template.pot \
  13. $(find . -name '*.lua')
  14. # Update translations.
  15. find locale -name '*.po' | while read -r file; do
  16. echo $file
  17. msgmerge --update $file locale/template.pot;
  18. done