generate-mo.sh 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # make bash sane
  3. set -eu -o pipefail
  4. DIR=$(basename "$PWD")
  5. if [[ "$DIR" != "locale" ]]; then
  6. echo "You are not inside the 'locale' directory"
  7. echo "ABORTING."
  8. exit 0
  9. fi
  10. echo "Generating .mo files"
  11. msgfmt translations-ca.po -o ca_ES/LC_MESSAGES/translations.mo
  12. msgfmt translations-es.po -o es_ES/LC_MESSAGES/translations.mo
  13. msgfmt translations-eu.po -o eu_ES/LC_MESSAGES/translations.mo
  14. msgfmt translations-fr.po -o fr_FR/LC_MESSAGES/translations.mo
  15. msgfmt translations-ga.po -o ga_IE/LC_MESSAGES/translations.mo
  16. msgfmt translations-gd.po -o gd_GB/LC_MESSAGES/translations.mo
  17. msgfmt translations-gl.po -o gl_ES/LC_MESSAGES/translations.mo
  18. msgfmt translations-hu.po -o hu_HU/LC_MESSAGES/translations.mo
  19. msgfmt translations-it.po -o it_IT/LC_MESSAGES/translations.mo
  20. msgfmt translations-nl.po -o nl_NL/LC_MESSAGES/translations.mo
  21. msgfmt translations-de.po -o de_DE/LC_MESSAGES/translations.mo
  22. msgfmt translations-pt_BR.po -o pt_BR/LC_MESSAGES/translations.mo
  23. msgfmt translations-ru.po -o ru_RU/LC_MESSAGES/translations.mo
  24. msgfmt translations-id.po -o id_ID/LC_MESSAGES/translations.mo
  25. msgfmt translations-zh_TW.po -o zh_TW/LC_MESSAGES/translations.mo
  26. echo "DONE"