update_po_files.sh 446 B

123456789101112131415
  1. #! /bin/bash
  2. cd ..
  3. #generate a new .po file
  4. #this will generate a file called messages.po
  5. find . -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
  6. #merge the new messages from messages.po into each existing .po file
  7. #this will generate new .po files
  8. find ./airtime_mvc/locale/ -name "*.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
  9. #delete the old .po files
  10. find ./airtime_mvc/locale/ -name "*.po~" -delete