update-source-strings.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # This script updates the dolphin-emu.pot file to match the strings in
  3. # the source code.
  4. cd "$(dirname "$0")/.."
  5. # Scan the source code for strings and put them in dolphin-emu.pot
  6. SRCDIR=Source
  7. find $SRCDIR -name '*.cpp' -o -name '*.h' -o -name '*.c' | \
  8. xgettext -s -p ./Languages/po -o dolphin-emu.pot --package-name="Dolphin Emulator" \
  9. --keyword=_ \
  10. --keyword=AskYesNoFmtT \
  11. --keyword=CriticalAlertFmtT \
  12. --keyword=PanicAlertFmtT \
  13. --keyword=PanicYesNoFmtT \
  14. --keyword=SuccessAlertFmtT \
  15. --keyword=GetStringT \
  16. --keyword=_trans \
  17. --keyword=tr:1,1t \
  18. --keyword=tr:1,2c \
  19. --keyword=QT_TR_NOOP \
  20. --keyword=FmtFormatT \
  21. --add-comments=i18n --from-code=utf-8 -f -
  22. # Copy strings from qt-strings.pot to dolphin-emu.pot
  23. xgettext -s -p ./Languages/po -o dolphin-emu.pot --package-name="Dolphin Emulator" \
  24. -j ./Languages/po/qt-strings.pot
  25. sed -i "s/SOME DESCRIPTIVE TITLE\./Translation of dolphin-emu.pot to LANGUAGE/" Languages/po/dolphin-emu.pot
  26. sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2003-2013/" Languages/po/dolphin-emu.pot
  27. sed -i "s/license as the PACKAGE package/license as the dolphin-emu package/" Languages/po/dolphin-emu.pot