aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-05-07 14:29:35 -0500
committerColin Snover2017-05-08 11:26:46 -0500
commitc9cbb8e31cba794259905a1c2263d8a3d6d63b9b (patch)
tree42202b5fec83d2059ce0160d8c4ef3e4f2bdc7c2
parent554a73e01209643161f8adecba825a5bc39f87f8 (diff)
downloadscummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.tar.gz
scummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.tar.bz2
scummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.zip
SCI: Translate messages passed to dialogues
-rw-r--r--engines/sci/engine/kgraphics.cpp7
-rw-r--r--engines/sci/engine/kgraphics32.cpp3
-rw-r--r--engines/sci/engine/savegame.cpp7
-rw-r--r--engines/sci/sci.cpp17
4 files changed, 19 insertions, 15 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index ffb9042b02..9bfeb9ab01 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -21,6 +21,7 @@
*/
#include "common/system.h"
+#include "common/translation.h"
#include "engines/util.h"
#include "graphics/cursorman.h"
@@ -70,7 +71,7 @@ static int16 adjustGraphColor(int16 color) {
}
void showScummVMDialog(const Common::String &message) {
- GUI::MessageDialog dialog(message, "OK");
+ GUI::MessageDialog dialog(message, _("OK"));
dialog.runModal();
}
@@ -981,12 +982,12 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
if (!changeDirButton.isNull()) {
// check if checkDirButton is still enabled, in that case we are called the first time during that room
if (!(readSelectorValue(s->_segMan, changeDirButton, SELECTOR(state)) & SCI_CONTROLS_STYLE_DISABLED)) {
- showScummVMDialog("Characters saved inside ScummVM are shown "
+ showScummVMDialog(_("Characters saved inside ScummVM are shown "
"automatically. Character files saved in the original "
"interpreter need to be put inside ScummVM's saved games "
"directory and a prefix needs to be added depending on which "
"game it was saved in: 'qfg1-' for Quest for Glory 1, 'qfg2-' "
- "for Quest for Glory 2. Example: 'qfg2-thief.sav'.");
+ "for Quest for Glory 2. Example: 'qfg2-thief.sav'."));
}
}
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 38c760fabc..76ed27ae68 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -21,6 +21,7 @@
*/
#include "common/system.h"
+#include "common/translation.h"
#include "engines/util.h"
#include "graphics/cursorman.h"
@@ -347,7 +348,7 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) {
case 1:
// Load a help file
// Maybe in the future we can implement this, but for now this message should suffice
- showScummVMDialog("Please use an external viewer to open the game's help file: " + s->_segMan->getString(argv[1]));
+ showScummVMDialog(Common::String::format(_("Please use an external viewer to open the game's help file: %s"), s->_segMan->getString(argv[1]).c_str()));
break;
case 2:
// Looks like some init function
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index e2099a4865..5172de3f43 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/func.h"
#include "common/serializer.h"
+#include "common/translation.h"
#include "graphics/thumbnail.h"
#include "sci/sci.h"
@@ -1258,9 +1259,9 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
if ((meta.version < MINIMUM_SAVEGAME_VERSION) || (meta.version > CURRENT_SAVEGAME_VERSION)) {
if (meta.version < MINIMUM_SAVEGAME_VERSION) {
- showScummVMDialog("The format of this saved game is obsolete, unable to load it");
+ showScummVMDialog(_("The format of this saved game is obsolete, unable to load it"));
} else {
- Common::String msg = Common::String::format("Savegame version is %d, maximum supported is %0d", meta.version, CURRENT_SAVEGAME_VERSION);
+ Common::String msg = Common::String::format(_("Savegame version is %d, maximum supported is %0d"), meta.version, CURRENT_SAVEGAME_VERSION);
showScummVMDialog(msg);
}
@@ -1271,7 +1272,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
if (meta.gameObjectOffset > 0 && meta.script0Size > 0) {
Resource *script0 = g_sci->getResMan()->findResource(ResourceId(kResourceTypeScript, 0), false);
if (script0->size() != meta.script0Size || g_sci->getGameObject().getOffset() != meta.gameObjectOffset) {
- showScummVMDialog("This saved game was created with a different version of the game, unable to load it");
+ showScummVMDialog(_("This saved game was created with a different version of the game, unable to load it"));
s->r_acc = TRUE_REG; // signal failure
return;
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 9d6e4e0451..c51894807e 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -23,6 +23,7 @@
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "engines/util.h"
@@ -363,23 +364,23 @@ Common::Error SciEngine::run() {
Resource *buggyScript = _resMan->findResource(ResourceId(kResourceTypeScript, 180), 0);
if (buggyScript && (buggyScript->size() == 12354 || buggyScript->size() == 12362)) {
- showScummVMDialog("A known buggy game script has been detected, which could "
+ showScummVMDialog(_("A known buggy game script has been detected, which could "
"prevent you from progressing later on in the game, during "
"the sequence with the Green Man's riddles. Please, apply "
"the latest patch for this game by Sierra to avoid possible "
- "problems");
+ "problems"));
}
}
if (getGameId() == GID_KQ7 && ConfMan.getBool("subtitles")) {
- showScummVMDialog("Subtitles are enabled, but subtitling in King's"
+ showScummVMDialog(_("Subtitles are enabled, but subtitling in King's"
" Quest 7 was unfinished and disabled in the release"
" version of the game. ScummVM allows the subtitles"
" to be re-enabled, but because they were removed from"
" the original game, they do not always render"
" properly or reflect the actual game speech."
" This is not a ScummVM bug -- it is a problem with"
- " the game's assets.");
+ " the game's assets."));
}
// Show a warning if the user has selected a General MIDI device, no GM patch exists
@@ -396,7 +397,7 @@ Common::Error SciEngine::run() {
case GID_SQ1:
case GID_SQ4:
case GID_FAIRYTALES:
- showScummVMDialog("You have selected General MIDI as a sound device. Sierra "
+ showScummVMDialog(_("You have selected General MIDI as a sound device. Sierra "
"has provided after-market support for General MIDI for this "
"game in their \"General MIDI Utility\". Please, apply this "
"patch in order to enjoy MIDI music with this game. Once you "
@@ -406,7 +407,7 @@ Common::Error SciEngine::run() {
"the instructions in the READ.ME file included in the patch and "
"rename the associated *.PAT file to 4.PAT and place it in the "
"game folder. Without this patch, General MIDI music for this "
- "game will sound badly distorted.");
+ "game will sound badly distorted."));
break;
default:
break;
@@ -415,11 +416,11 @@ Common::Error SciEngine::run() {
}
if (gameHasFanMadePatch()) {
- showScummVMDialog("Your game is patched with a fan made script patch. Such patches have "
+ showScummVMDialog(_("Your game is patched with a fan made script patch. Such patches have "
"been reported to cause issues, as they modify game scripts extensively. "
"The issues that these patches fix do not occur in ScummVM, so you are "
"advised to remove this patch from your game folder in order to avoid "
- "having unexpected errors and/or issues later on.");
+ "having unexpected errors and/or issues later on."));
}
runGame();