diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/animation.cpp | 7 | ||||
-rw-r--r-- | engines/dialogs.cpp | 4 | ||||
-rw-r--r-- | engines/engine.cpp | 17 | ||||
-rw-r--r-- | engines/gob/inter_playtoons.cpp | 3 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 5 | ||||
-rw-r--r-- | engines/gob/inter_v5.cpp | 4 | ||||
-rw-r--r-- | engines/groovie/script.cpp | 3 | ||||
-rw-r--r-- | engines/kyra/sound_midi.cpp | 5 | ||||
-rw-r--r-- | engines/m4/m4_menus.cpp | 3 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 19 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 6 | ||||
-rw-r--r-- | engines/sky/compact.cpp | 7 | ||||
-rw-r--r-- | engines/sword1/animation.cpp | 10 | ||||
-rw-r--r-- | engines/sword1/control.cpp | 12 | ||||
-rw-r--r-- | engines/sword1/logic.cpp | 3 | ||||
-rw-r--r-- | engines/sword2/animation.cpp | 10 | ||||
-rw-r--r-- | engines/tinsel/saveload.cpp | 5 |
17 files changed, 67 insertions, 56 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index eb78ca3d9b..d9a585bd05 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -29,6 +29,7 @@ #include "common/file.h" #include "common/system.h" #include "common/textconsole.h" +#include "common/translation.h" #include "graphics/cursorman.h" #include "graphics/palette.h" @@ -540,10 +541,8 @@ MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) { return new MoviePlayerSMK(vm, baseName); } - char buf[60]; - - sprintf(buf, "Cutscene file '%s' not found!", baseName); - GUI::MessageDialog dialog(buf, "OK"); + Common::String buf = Common::String::format(_("Cutscene file '%s' not found!"), baseName); + GUI::MessageDialog dialog(buf, _("OK")); dialog.runModal(); return NULL; diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 3fd8671e55..531cf32dbc 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -143,9 +143,9 @@ void MainMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint3 break; case kHelpCmd: { GUI::MessageDialog dialog( - "Sorry, this engine does not currently provide in-game help. " + _("Sorry, this engine does not currently provide in-game help. " "Please consult the README for basic information, and for " - "instructions on how to obtain further assistance."); + "instructions on how to obtain further assistance.")); dialog.runModal(); } break; diff --git a/engines/engine.cpp b/engines/engine.cpp index 210b0b46a3..dc30b4bd0d 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -42,6 +42,7 @@ #include "common/list_intern.h" #include "common/scummsys.h" #include "common/textconsole.h" +#include "common/translation.h" #include "gui/debugger.h" #include "gui/dialog.h" @@ -216,7 +217,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: // Just show warnings then these occur: #ifdef USE_RGB_COLOR if (gfxError & OSystem::kTransactionFormatNotSupported) { - Common::String message = "Could not initialize color format."; + Common::String message = _("Could not initialize color format."); GUI::MessageDialog dialog(message); dialog.runModal(); @@ -224,7 +225,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: #endif if (gfxError & OSystem::kTransactionModeSwitchFailed) { - Common::String message = "Could not switch to video mode: '"; + Common::String message = _("Could not switch to video mode: '"); message += ConfMan.get("gfx_mode"); message += "'."; @@ -233,12 +234,12 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: } if (gfxError & OSystem::kTransactionAspectRatioFailed) { - GUI::MessageDialog dialog("Could not apply aspect ratio setting."); + GUI::MessageDialog dialog(_("Could not apply aspect ratio setting.")); dialog.runModal(); } if (gfxError & OSystem::kTransactionFullscreenFailed) { - GUI::MessageDialog dialog("Could not apply fullscreen setting."); + GUI::MessageDialog dialog(_("Could not apply fullscreen setting.")); dialog.runModal(); } } @@ -338,22 +339,22 @@ void Engine::checkCD() { if (GetDriveType(buffer) == DRIVE_CDROM) { GUI::MessageDialog dialog( - "You appear to be playing this game directly\n" + _("You appear to be playing this game directly\n" "from the CD. This is known to cause problems,\n" "and it is therefore recommended that you copy\n" "the data files to your hard disk instead.\n" - "See the README file for details.", "OK"); + "See the README file for details."), _("OK")); dialog.runModal(); } else { // If we reached here, the game has audio tracks, // it's not ran from the CD and the tracks have not // been ripped. GUI::MessageDialog dialog( - "This game has audio tracks in its disk. These\n" + _("This game has audio tracks in its disk. These\n" "tracks need to be ripped from the disk using\n" "an appropriate CD audio extracting tool in\n" "order to listen to the game's music.\n" - "See the README file for details.", "OK"); + "See the README file for details."), _("OK")); dialog.runModal(); } #endif diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index d57d2f354b..e05cae354c 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -22,6 +22,7 @@ #include "common/endian.h" #include "common/str.h" +#include "common/translation.h" #include "gui/message.h" @@ -252,7 +253,7 @@ void Inter_Playtoons::oPlaytoons_readData(OpFuncParams ¶ms) { WRITE_VAR(1, 1); if (!_vm->_saveLoad->load(file.c_str(), dataVar, size, offset)) { - GUI::MessageDialog dialog("Failed to load game state from file."); + GUI::MessageDialog dialog(_("Failed to load game state from file.")); dialog.runModal(); } else WRITE_VAR(1, 0); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 84cae3b380..2fea18343d 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -22,6 +22,7 @@ #include "common/endian.h" #include "common/str.h" +#include "common/translation.h" #include "gui/message.h" @@ -1279,7 +1280,7 @@ void Inter_v2::o2_readData(OpFuncParams ¶ms) { if (!_vm->_saveLoad->load(file, dataVar, size, offset)) { - GUI::MessageDialog dialog("Failed to load game state from file."); + GUI::MessageDialog dialog(_("Failed to load game state from file.")); dialog.runModal(); } else @@ -1349,7 +1350,7 @@ void Inter_v2::o2_writeData(OpFuncParams ¶ms) { if (!_vm->_saveLoad->save(file, dataVar, size, offset)) { - GUI::MessageDialog dialog("Failed to save game state to file."); + GUI::MessageDialog dialog(_("Failed to save game state to file.")); dialog.runModal(); } else diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp index ed371737bd..c0e8978afd 100644 --- a/engines/gob/inter_v5.cpp +++ b/engines/gob/inter_v5.cpp @@ -20,6 +20,8 @@ * */ +#include "common/translation.h" + #include "gui/message.h" #include "gob/gob.h" @@ -102,7 +104,7 @@ void Inter_v5::o5_deleteFile() { if (mode == SaveLoad::kSaveModeSave) { if (!_vm->_saveLoad->deleteFile(file)) { - GUI::MessageDialog dialog("Failed to delete file."); + GUI::MessageDialog dialog(_("Failed to delete file.")); dialog.runModal(); } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index b52a8723fc..f87e6bb91b 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -36,6 +36,7 @@ #include "common/events.h" #include "common/file.h" #include "common/macresman.h" +#include "common/translation.h" #include "gui/message.h" @@ -413,7 +414,7 @@ void Script::savegame(uint slot) { if (!file) { debugC(9, kGroovieDebugScript, "Save file pointer is null"); - GUI::MessageDialog dialog("Failed to save game", "OK"); + GUI::MessageDialog dialog(_("Failed to save game"), _("OK")); dialog.runModal(); return; } diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp index 6c003d0a11..dc0f8c11ec 100644 --- a/engines/kyra/sound_midi.cpp +++ b/engines/kyra/sound_midi.cpp @@ -25,6 +25,7 @@ #include "common/system.h" #include "common/config-manager.h" +#include "common/translation.h" #include "gui/message.h" @@ -471,11 +472,11 @@ SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *dri // (This will only happen in The Legend of Kyrandia 1 though, all other // supported games include special General MIDI tracks). if (_type == kMidiMT32 && !_nativeMT32) { - ::GUI::MessageDialog dialog("You appear to be using a General MIDI device,\n" + ::GUI::MessageDialog dialog(_("You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" "General MIDI ones. After all it might happen\n" - "that a few tracks will not be correctly played."); + "that a few tracks will not be correctly played.")); dialog.runModal(); } } diff --git a/engines/m4/m4_menus.cpp b/engines/m4/m4_menus.cpp index 787d8666f6..3384a82c8b 100644 --- a/engines/m4/m4_menus.cpp +++ b/engines/m4/m4_menus.cpp @@ -22,6 +22,7 @@ #include "common/algorithm.h" // for find() #include "common/textconsole.h" +#include "common/translation.h" #include "gui/dialog.h" #include "gui/message.h" @@ -134,7 +135,7 @@ void OrionCallbacks::saveLoadSaveFn(DialogView *view, MenuObject *item) { bool succeeded = view->vm()->_saveLoad->save(view->_selectedSlot + 1, textItem->getText()); if (!succeeded) { - GUI::MessageDialog dialog("Save game failed!"); + GUI::MessageDialog dialog(_("Save game failed!")); dialog.runModal(); } diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 673c613485..5a1daa256b 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -23,6 +23,7 @@ #include "common/savefile.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "gui/dialog.h" #include "gui/saveload.h" @@ -129,8 +130,7 @@ void SaveLoad_ns::doLoadGame(uint16 slot) { void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) { Common::OutSaveFile *f = getOutSaveFile(slot); if (f == 0) { - char buf[32]; - sprintf(buf, "Can't save game in slot %i\n\n", slot); + Common::String buf = Common::String::format(_("Can't save game in slot %i\n\n"), slot); GUI::MessageDialog dialog(buf); dialog.runModal(); return; @@ -208,7 +208,7 @@ bool SaveLoad::loadGame() { doLoadGame(_di); - GUI::TimedMessageDialog dialog("Loading game...", 1500); + GUI::TimedMessageDialog dialog(_("Loading game..."), 1500); dialog.runModal(); return true; @@ -223,7 +223,7 @@ bool SaveLoad::saveGame() { doSaveGame(slot, saveName.c_str()); - GUI::TimedMessageDialog dialog("Saving game...", 1500); + GUI::TimedMessageDialog dialog(_("Saving game..."), 1500); dialog.runModal(); return true; @@ -276,9 +276,9 @@ void SaveLoad_ns::getGamePartProgress(bool *complete, int size) { static bool askRenameOldSavefiles() { GUI::MessageDialog dialog0( - "ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" + _("ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" "The old names are no longer supported, so you will not be able to load your games if you don't convert them.\n\n" - "Press OK to convert them now, otherwise you will be asked next time.\n", "OK", "Cancel"); + "Press OK to convert them now, otherwise you will be asked next time.\n"), _("OK"), _("Cancel")); return (dialog0.runModal() != 0); } @@ -321,12 +321,11 @@ void SaveLoad_ns::renameOldSavefiles() { return; } - char msg[200]; + Common::String msg; if (success == numOldSaves) { - sprintf(msg, "ScummVM successfully converted all your savefiles."); + msg = _("ScummVM successfully converted all your savefiles."); } else { - sprintf(msg, - "ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n\n" + msg = _("ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n\n" "Please report to the team."); } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index dd26e23b4d..51888de574 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1766,8 +1766,10 @@ void ScummEngine::setupMusic(int midi) { if (missingFile) { GUI::MessageDialog dialog( - "Native MIDI support requires the Roland Upgrade from LucasArts,\n" - "but " + fileName + " is missing. Using AdLib instead.", "Ok"); + Common::String::format( + _("Native MIDI support requires the Roland Upgrade from LucasArts,\n" + "but %s is missing. Using AdLib instead."), fileName.c_str()), + _("Ok")); dialog.runModal(); _musicType = MDT_ADLIB; } diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index 66ce92f8fc..84609d5500 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -25,6 +25,7 @@ #include "common/endian.h" #include "common/file.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sky/compact.h" #include "gui/message.h" #include <stddef.h> // for ptrdiff_t @@ -126,8 +127,8 @@ static const uint32 turnTableOffsets[] = { SkyCompact::SkyCompact() { _cptFile = new Common::File(); if (!_cptFile->open("sky.cpt")) { - GUI::MessageDialog dialog("Unable to find \"sky.cpt\" file!\n" - "Please download it from www.scummvm.org", "OK", NULL); + GUI::MessageDialog dialog(_("Unable to find \"sky.cpt\" file!\n" + "Please download it from www.scummvm.org"), _("OK"), NULL); dialog.runModal(); error("Unable to find \"sky.cpt\" file\nPlease download it from www.scummvm.org"); } @@ -137,7 +138,7 @@ SkyCompact::SkyCompact() { error("unknown \"sky.cpt\" version"); if (SKY_CPT_SIZE != _cptFile->size()) { - GUI::MessageDialog dialog("The \"sky.cpt\" file has an incorrect size.\nPlease (re)download it from www.scummvm.org", "OK", NULL); + GUI::MessageDialog dialog(_("The \"sky.cpt\" file has an incorrect size.\nPlease (re)download it from www.scummvm.org"), _("OK"), NULL); dialog.runModal(); error("Incorrect sky.cpt size (%d, expected: %d)", _cptFile->size(), SKY_CPT_SIZE); } diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 7e9d1142be..cb86264eeb 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -24,6 +24,7 @@ #include "common/events.h" #include "common/keyboard.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sword1/sword1.h" #include "sword1/animation.h" #include "sword1/text.h" @@ -324,7 +325,6 @@ uint32 DXADecoderWithSound::getElapsedTime() const { MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system) { Common::String filename; - char buf[60]; Audio::SoundHandle *bgSoundHandle = new Audio::SoundHandle; filename = Common::String::format("%s.smk", sequenceList[id]); @@ -341,7 +341,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::M DXADecoderWithSound *dxaDecoder = new DXADecoderWithSound(snd, bgSoundHandle); return new MoviePlayer(vm, textMan, snd, system, bgSoundHandle, dxaDecoder, kVideoDecoderDXA); #else - GUI::MessageDialog dialog("DXA cutscenes found but ScummVM has been built without zlib support", "OK"); + GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK")); dialog.runModal(); return NULL; #endif @@ -351,13 +351,13 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::M filename = Common::String::format("%s.mp2", sequenceList[id]); if (Common::File::exists(filename)) { - GUI::MessageDialog dialog("MPEG2 cutscenes are no longer supported", "OK"); + GUI::MessageDialog dialog(_("MPEG2 cutscenes are no longer supported"), _("OK")); dialog.runModal(); return NULL; } - sprintf(buf, "Cutscene '%s' not found", sequenceList[id]); - GUI::MessageDialog dialog(buf, "OK"); + Common::String buf = Common::String::format(_("Cutscene '%s' not found"), sequenceList[id]); + GUI::MessageDialog dialog(buf, _("OK")); dialog.runModal(); return NULL; diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 86947db8ae..36d5a24e99 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -27,6 +27,7 @@ #include "common/system.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "graphics/palette.h" #include "graphics/thumbnail.h" @@ -859,9 +860,9 @@ void Control::checkForOldSaveGames() { } GUI::MessageDialog dialog0( - "ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" + _("ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" "The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n\n" - "Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n", "OK", "Cancel"); + "Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n"), _("OK"), _("Cancel")); int choice = dialog0.runModal(); if (choice == GUI::kMessageCancel) { @@ -1228,11 +1229,10 @@ bool Control::convertSaveGame(uint8 slot, char* desc) { if (testSave) { delete testSave; - char msg[200]; - sprintf(msg, "Target new save game already exists!\n" - "Would you like to keep the old save game (%s) or the new one (%s)?\n", + Common::String msg = Common::String::format(_("Target new save game already exists!\n" + "Would you like to keep the old save game (%s) or the new one (%s)?\n"), oldFileName, newFileName); - GUI::MessageDialog dialog0(msg, "Keep the old one", "Keep the new one"); + GUI::MessageDialog dialog0(msg, _("Keep the old one"), _("Keep the new one")); int choice = dialog0.runModal(); if (choice == GUI::kMessageCancel) { diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp index 00f7112c05..5b42c9340e 100644 --- a/engines/sword1/logic.cpp +++ b/engines/sword1/logic.cpp @@ -23,6 +23,7 @@ #include "common/endian.h" #include "common/util.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sword1/logic.h" #include "sword1/text.h" @@ -1629,7 +1630,7 @@ int Logic::fnRestartGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 int Logic::fnQuitGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) { if (SwordEngine::_systemVars.isDemo) { - GUI::MessageDialog dialog("This is the end of the Broken Sword 1 Demo", "OK", NULL); + GUI::MessageDialog dialog(_("This is the end of the Broken Sword 1 Demo"), _("OK"), NULL); dialog.runModal(); Engine::quitGame(); } else diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 11ee4a98fd..133abf165e 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -26,6 +26,7 @@ #include "common/mutex.h" #include "common/system.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sword2/sword2.h" #include "sword2/defs.h" @@ -359,7 +360,6 @@ uint32 DXADecoderWithSound::getElapsedTime() const { MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *snd, OSystem *system) { Common::String filename; - char buf[60]; Audio::SoundHandle *bgSoundHandle = new Audio::SoundHandle; filename = Common::String::format("%s.smk", name); @@ -376,7 +376,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s DXADecoderWithSound *dxaDecoder = new DXADecoderWithSound(snd, bgSoundHandle); return new MoviePlayer(vm, snd, system, bgSoundHandle, dxaDecoder, kVideoDecoderDXA); #else - GUI::MessageDialog dialog("DXA cutscenes found but ScummVM has been built without zlib support", "OK"); + GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK")); dialog.runModal(); return NULL; #endif @@ -386,7 +386,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s filename = Common::String::format("%s.mp2", name); if (Common::File::exists(filename)) { - GUI::MessageDialog dialog("MPEG2 cutscenes are no longer supported", "OK"); + GUI::MessageDialog dialog(_("MPEG2 cutscenes are no longer supported"), _("OK")); dialog.runModal(); return NULL; } @@ -394,8 +394,8 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s // The demo tries to play some cutscenes that aren't there, so make those warnings more discreet. // In addition, some of the later re-releases of the game don't have the "eye" Virgin logo movie. if (!vm->_logic->readVar(DEMO) && strcmp(name, "eye") != 0) { - sprintf(buf, "Cutscene '%s' not found", name); - GUI::MessageDialog dialog(buf, "OK"); + Common::String buf = Common::String::format(_("Cutscene '%s' not found"), name); + GUI::MessageDialog dialog(buf, _("OK")); dialog.runModal(); } else warning("Cutscene '%s' not found", name); diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index caaf9a13f8..1244168a21 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -34,6 +34,7 @@ #include "common/serializer.h" #include "common/savefile.h" #include "common/textconsole.h" +#include "common/translation.h" #include "gui/message.h" @@ -464,7 +465,7 @@ static bool DoRestore() { delete f; if (failed) { - GUI::MessageDialog dialog("Failed to load game state from file."); + GUI::MessageDialog dialog(_("Failed to load game state from file.")); dialog.runModal(); } @@ -542,7 +543,7 @@ save_failure: _vm->getSaveFileMan()->removeSavefile(SaveSceneName); SaveSceneName = NULL; // Invalidate save name } - GUI::MessageDialog dialog("Failed to save game state to file."); + GUI::MessageDialog dialog(_("Failed to save game state to file.")); dialog.runModal(); } |