/components/lazreport/tools/localize.sh

http://github.com/graemeg/lazarus · Shell · 27 lines · 8 code · 4 blank · 15 comment · 1 complexity · 30346e904d6229a0b5743a7c967b9a5d MD5 · raw file

  1. #!/usr/bin/env bash
  2. #
  3. # Usage: sh localize.sh
  4. #
  5. # This script should be executed after adding new resource strings and after
  6. # udating the translated .po files.
  7. #
  8. # This script
  9. # - converts all compiled .rst files to .po files,
  10. # - updates all translated xx.po files
  11. # - converts all translated .po files into .mo files
  12. #
  13. set -x
  14. set -e
  15. # IDE
  16. # Lazarus languages : ca de es esutf fi fiwin fr he it itiso nl pl pliso plwin ru ruwin ruutf
  17. IDE_RST=`find . -name lr_const.rst | xargs ls -1t | head -1`;
  18. rstconv -i $IDE_RST -o ./../languages/lazreport.po
  19. updatepofiles ./../languages/lazreport.po
  20. for lang in fr; do
  21. msgfmt ./../languages/lazreport.$lang.po -o ./../languages/lazreport/lazaruside.$lang.mo
  22. done
  23. # end.