diff --git a/babel.sh b/babel.sh new file mode 100755 index 0000000000000000000000000000000000000000..5acd7dd9091570575561b311a6a1fe3a939e9e2c --- /dev/null +++ b/babel.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +if [[ $# -lt 1 ]]; then + echo >&2 "error: expected at least one argument" +fi + +case "${1}" in + init) + pybabel init \ + --input-file "invenio_utilities_tuw/translations/messages.pot" \ + --output-dir "invenio_utilities_tuw/translations/" + ;; + compile) + pybabel compile \ + --directory "invenio_utilities_tuw/translations/" + ;; + extract) + pybabel extract \ + --copyright-holder "TU Wien" \ + --msgid-bugs-address "tudata@tuwien.ac.at" \ + --mapping-file "babel.ini" \ + --output-file "invenio_utilities_tuw/translations/messages.pot" \ + --add-comments "NOTE" + ;; + update) + pybabel update \ + --input-file "invenio_utilities_tuw/translations/messages.pot" \ + --output-dir "invenio_utilities_tuw/translations/" + ;; + *) + echo >&2 "unknown command: ${1}" + exit 1 + ;; +esac