aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorColin Snover2017-05-07 14:29:35 -0500
committerColin Snover2017-05-08 11:26:46 -0500
commitc9cbb8e31cba794259905a1c2263d8a3d6d63b9b (patch)
tree42202b5fec83d2059ce0160d8c4ef3e4f2bdc7c2 /engines/sci/engine
parent554a73e01209643161f8adecba825a5bc39f87f8 (diff)
downloadscummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.tar.gz
scummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.tar.bz2
scummvm-rg350-c9cbb8e31cba794259905a1c2263d8a3d6d63b9b.zip
SCI: Translate messages passed to dialogues
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp7
-rw-r--r--engines/sci/engine/kgraphics32.cpp3
-rw-r--r--engines/sci/engine/savegame.cpp7
3 files changed, 10 insertions, 7 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;