diff --git a/engines/access/POTFILES b/engines/access/POTFILES new file mode 100644 index 00000000000..eafbe170562 --- /dev/null +++ b/engines/access/POTFILES @@ -0,0 +1 @@ +engines/access/resources.cpp diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp index 096fb15b353..79cf844df66 100644 --- a/engines/access/resources.cpp +++ b/engines/access/resources.cpp @@ -24,6 +24,7 @@ #include "access/access.h" #include "access/amazon/amazon_resources.h" #include "access/martian/martian_resources.h" +#include "common/translation.h" namespace Access { @@ -38,8 +39,9 @@ Resources *Resources::init(AccessEngine *vm) { bool Resources::load(Common::String &errorMessage) { Common::File f; - if (!f.open("access.dat")) { - errorMessage = "Could not locate required access.dat file"; + Common::String filename = "access.dat"; + if (!f.open(filename.c_str())) { + errorMessage = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); return false; } diff --git a/engines/drascula/POTFILES b/engines/drascula/POTFILES index ea79f9e066b..925b3099960 100644 --- a/engines/drascula/POTFILES +++ b/engines/drascula/POTFILES @@ -1,2 +1,3 @@ +engines/drascula/drascula.cpp engines/drascula/detection.cpp engines/drascula/saveload.cpp diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ab910564802..f58104fd40f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -25,6 +25,7 @@ #include "common/file.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "backends/audiocd/audiocd.h" @@ -955,12 +956,13 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ bool DrasculaEngine::loadDrasculaDat() { Common::File in; + Common::String filename = "drascula.dat"; int i; - in.open("drascula.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - Common::String errorMessage = "You're missing the 'drascula.dat' file. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); diff --git a/engines/hugo/POTFILES b/engines/hugo/POTFILES index ff61e12ca5d..b7b99ca095a 100644 --- a/engines/hugo/POTFILES +++ b/engines/hugo/POTFILES @@ -1 +1,2 @@ +engines/hugo/hugo.cpp engines/hugo/file.cpp diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 267eb08436f..e129727e848 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -27,6 +27,7 @@ #include "common/debug-channels.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "hugo/hugo.h" #include "hugo/console.h" @@ -429,10 +430,11 @@ void HugoEngine::runMachine() { */ bool HugoEngine::loadHugoDat() { Common::File in; - in.open("hugo.dat"); + Common::String filename = "hugo.dat"; + in.open(filename.c_str()); if (!in.isOpen()) { - Common::String errorMessage = "You're missing the 'hugo.dat' file. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); return false; diff --git a/engines/lure/POTFILES b/engines/lure/POTFILES new file mode 100644 index 00000000000..d4fde2ab7bb --- /dev/null +++ b/engines/lure/POTFILES @@ -0,0 +1 @@ +engines/lure/lure.cpp diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index 45fe0af0256..9fd8372f296 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -24,6 +24,7 @@ #include "common/debug-channels.h" #include "common/system.h" #include "common/savefile.h" +#include "common/translation.h" #include "engines/util.h" @@ -60,7 +61,7 @@ Common::Error LureEngine::init() { Common::File f; VersionStructure version; if (!f.open(SUPPORT_FILENAME)) { - GUIError("Could not locate Lure support file"); + GUIError(_("You're missing the '%s' file. Get it from the ScummVM website"), SUPPORT_FILENAME); return Common::kUnknownError; } diff --git a/engines/mortevielle/POTFILES b/engines/mortevielle/POTFILES new file mode 100644 index 00000000000..ee7ef3ed693 --- /dev/null +++ b/engines/mortevielle/POTFILES @@ -0,0 +1 @@ +engines/mortevielle/mortevielle.cpp diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 4f0899deb41..c56f22bb8f0 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -37,6 +37,7 @@ #include "common/system.h" #include "common/config-manager.h" #include "common/debug-channels.h" +#include "common/translation.h" #include "engines/util.h" #include "engines/engine.h" #include "graphics/palette.h" @@ -302,7 +303,8 @@ Common::ErrorCode MortevielleEngine::loadMortDat() { // Open the mort.dat file if (!f.open(MORT_DAT)) { - GUIErrorMessage("Could not locate 'mort.dat'."); + Common::String msg = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), MORT_DAT); + GUIErrorMessage(msg); return Common::kReadingFailed; } diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index c2ca557ec22..731c390d6f7 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -126,11 +126,11 @@ 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); - dialog.runModal(); - error("Unable to find \"sky.cpt\" file\nPlease download it from www.scummvm.org"); + Common::String filename = "sky.cpt"; + if (!_cptFile->open(filename.c_str())) { + Common::String msg = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); + GUIErrorMessage(msg); + error("%s", msg.c_str()); } uint16 fileVersion = _cptFile->readUint16LE(); diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 3cf566a0e5b..ebfe5ff1be8 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -91,9 +91,10 @@ void Resources::precomputeDialogOffsets() { bool Resources::loadArchives(const ADGameDescription *gd) { Common::File *dat_file = new Common::File(); - if (!dat_file->open("teenagent.dat")) { + Common::String filename = "teenagent.dat"; + if (!dat_file->open(filename.c_str())) { delete dat_file; - Common::String errorMessage = _("You're missing the 'teenagent.dat' file. Get it from the ScummVM website"); + Common::String errorMessage = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); warning("%s", errorMessage.c_str()); GUIErrorMessage(errorMessage); return false; diff --git a/engines/tony/POTFILES b/engines/tony/POTFILES new file mode 100644 index 00000000000..a2e3c09eab9 --- /dev/null +++ b/engines/tony/POTFILES @@ -0,0 +1 @@ +engines/tony/tony.cpp diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index c51f449aa1d..a3ba9c0f0c5 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -27,6 +27,7 @@ #include "common/events.h" #include "common/file.h" #include "common/installshield_cab.h" +#include "common/translation.h" #include "tony/tony.h" #include "tony/custom.h" #include "tony/debugger.h" @@ -189,11 +190,12 @@ Common::ErrorCode TonyEngine::init() { bool TonyEngine::loadTonyDat() { Common::String msg; Common::File in; + Common::String filename = "tony.dat"; - in.open("tony.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - msg = "You're missing the 'tony.dat' file. Get it from the ScummVM website"; + msg = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false; diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 43fb3a1b1f0..b0cbe80cfd4 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -4909,12 +4909,13 @@ void ToonEngine::createShadowLUT() { bool ToonEngine::loadToonDat() { Common::File in; Common::String msg; + Common::String filename = "toon.dat"; int majVer, minVer; - in.open("toon.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - msg = _("You're missing the 'toon.dat' file. Get it from the ScummVM website"); + msg = Common::String::format(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false;