gettextize 934 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. cd ${0/gettextize/}/..
  3. SRCDIR=Source
  4. CPP_FILE_LIST=$(find $SRCDIR \( -name '*.cpp' -o -name '*.h' -o -name '*.c' \) \
  5. -a ! -path '*Debug*')
  6. xgettext -d dolphin-emu -s --keyword=_ --keyword=wxTRANSLATE --keyword=SuccessAlertT \
  7. --keyword=PanicAlertT --keyword=PanicYesNoT --keyword=AskYesNoT --keyword=_trans \
  8. --keyword=CriticalAlertT --add-comments=i18n -p ./Languages/po -o dolphin-emu.pot \
  9. $CPP_FILE_LIST --package-name="Dolphin Emulator"
  10. sed -i "s/SOME DESCRIPTIVE TITLE\./Translation of dolphin-emu.pot to LANGUAGE/" Languages/po/dolphin-emu.pot
  11. sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2003-2013/" Languages/po/dolphin-emu.pot
  12. sed -i "s/license as the PACKAGE package/license as the dolphin-emu package/" Languages/po/dolphin-emu.pot
  13. POTFILE=./Languages/po/dolphin-emu.pot
  14. PO_FILES=$(find ./Languages/po -name '*.po')
  15. for PO in $PO_FILES
  16. do
  17. msgmerge --quiet --update --backup=none -s $PO $POTFILE
  18. done