Fix predefined Qt strings not getting translated

https://bugs.dolphin-emu.org/issues/11507
This commit is contained in:
JosJuice
2020-10-19 15:58:51 +02:00
parent 0f5bf90013
commit 12628c8c45
2 changed files with 82 additions and 0 deletions

View File

@ -4,6 +4,8 @@
# the source code.
cd "$(dirname "$0")/.."
# Scan the source code for strings and put them in dolphin-emu.pot
SRCDIR=Source
find $SRCDIR -name '*.cpp' -o -name '*.h' -o -name '*.c' | \
xgettext -d dolphin-emu -s --keyword=_ --keyword=wxTRANSLATE --keyword=SuccessAlertT \
@ -13,6 +15,10 @@ find $SRCDIR -name '*.cpp' -o -name '*.h' -o -name '*.c' | \
--add-comments=i18n -p ./Languages/po -o dolphin-emu.pot -f - --package-name="Dolphin Emulator" \
--from-code=utf-8
# Copy strings from qt-strings.pot to dolphin-emu.pot
xgettext -d dolphin-emu -s -p ./Languages/po -o dolphin-emu.pot --package-name="Dolphin Emulator" \
-j ./Languages/po/qt-strings.pot
sed -i "s/SOME DESCRIPTIVE TITLE\./Translation of dolphin-emu.pot to LANGUAGE/" Languages/po/dolphin-emu.pot
sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2003-2013/" Languages/po/dolphin-emu.pot
sed -i "s/license as the PACKAGE package/license as the dolphin-emu package/" Languages/po/dolphin-emu.pot