msgfmt.sh 457 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. #
  3. # msgfmt.sh
  4. #
  5. # Recompiles binary MO files for all languages
  6. #
  7. # @author Christopher Han <xiphux@gmail.com>
  8. # @copyright Copyright (c) 2010 Christopher Han
  9. # @package GitPHP
  10. # @package util
  11. #
  12. LOCALEDIR="locale"
  13. BUNDLE="gitphp"
  14. for i in "$LOCALEDIR"/*; do
  15. if [ -d "$i" ]; then
  16. if [ -e "${i}/${BUNDLE}.po" ]; then
  17. echo "Building ${i}..."
  18. rm -f "${i}/${BUNDLE}.mo"
  19. msgfmt -v -o "${i}/${BUNDLE}.mo" "${i}/${BUNDLE}.po"
  20. fi
  21. fi
  22. done