update_translations.sh 451 B

12345678910111213141516
  1. #!/bin/sh
  2. # script to easily update translation language files
  3. # add new language:
  4. # pybabel init -i messages.pot -d searx/translations -l en
  5. SEARX_DIR='searx'
  6. pybabel extract -F babel.cfg -o messages.pot "$SEARX_DIR"
  7. for f in `ls "$SEARX_DIR"'/translations/'`; do
  8. pybabel update -N -i messages.pot -d "$SEARX_DIR"'/translations/' -l "$f"
  9. done
  10. echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'