Skip to content

Commit

Permalink
Fix predefined Qt strings not getting translated
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed Oct 19, 2020
1 parent 0f5bf90 commit 12628c8
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
76 changes: 76 additions & 0 deletions Languages/po/qt-strings.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This file contains strings which are defined in Qt's source code
# and may be shown in applications which use Qt. Extracted from Qt 5.15.1.
msgid ""
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:708
msgid "OK"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:710
msgid "Save"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:712
msgid "Save All"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:714
msgid "Open"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:716
msgid "&Yes"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:718
msgid "Yes to &All"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:720
msgid "&No"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:722
msgid "N&o to All"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:724
msgid "Abort"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:726
msgid "Retry"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:728
msgid "Ignore"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:730
msgid "Close"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:732
msgid "Cancel"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:734
msgid "Discard"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:736
msgid "Help"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:738
msgid "Apply"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:740
msgid "Reset"
msgstr ""

#: qtbase/src/gui/kernel/qplatformtheme.cpp:742
msgid "Restore Defaults"
msgstr ""
6 changes: 6 additions & 0 deletions Languages/update-source-strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 12628c8

Please sign in to comment.