diff options
author | Alyssa Milburn | 2011-06-06 12:26:34 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-06-06 12:32:09 +0200 |
commit | b2a1566860ee21cd4bfe7f26ee43f80927fc677a (patch) | |
tree | 71cd628140df02a7835e2844b4218f95de9100da /engines | |
parent | 6842227ac2796edb6d82cbf0095c806fa6e738f6 (diff) | |
download | scummvm-rg350-b2a1566860ee21cd4bfe7f26ee43f80927fc677a.tar.gz scummvm-rg350-b2a1566860ee21cd4bfe7f26ee43f80927fc677a.tar.bz2 scummvm-rg350-b2a1566860ee21cd4bfe7f26ee43f80927fc677a.zip |
DETECTOR: Change printf calls to use logMessage.
Also make the strings translatable.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/advancedDetector.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index d093c958e7..2ee32b2f86 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -20,9 +20,6 @@ * */ -// FIXME: Avoid using printf -#define FORBIDDEN_SYMBOL_EXCEPTION_printf - #include "common/debug.h" #include "common/util.h" #include "common/hash-str.h" @@ -30,7 +27,9 @@ #include "common/macresman.h" #include "common/md5.h" #include "common/config-manager.h" +#include "common/system.h" #include "common/textconsole.h" +#include "common/translation.h" #include "engines/advancedDetector.h" @@ -366,14 +365,18 @@ static void reportUnknown(const Common::FSNode &path, const SizeMD5Map &filesSiz // // Might also be helpful to display the full path (for when this is used // from the mass detector). - printf("The game in '%s' seems to be unknown.\n", path.getPath().c_str()); - printf("Please, report the following data to the ScummVM team along with name\n"); - printf("of the game you tried to add and its version/language/etc.:\n"); + Common::String report = Common::String::format(_("The game in '%s' seems to be unknown."), path.getPath().c_str()) + "\n"; + report += _("Please, report the following data to the ScummVM team along with name"); + report += "\n"; + report += _("of the game you tried to add and its version/language/etc.:"); + report += "\n"; for (SizeMD5Map::const_iterator file = filesSizeMD5.begin(); file != filesSizeMD5.end(); ++file) - printf(" {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size); + report += Common::String::format(" {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size); + + report += "\n"; - printf("\n"); + g_system->logMessage(LogMessageType::kInfo, report.c_str()); } static ADGameDescList detectGameFilebased(const FileMap &allFiles, const ADParams ¶ms); @@ -626,10 +629,14 @@ static ADGameDescList detectGameFilebased(const FileMap &allFiles, const ADParam if (matchedDesc) { // We got a match matched.push_back(matchedDesc); if (params.flags & kADFlagPrintWarningOnFileBasedFallback) { - printf("Your game version has been detected using filename matching as a\n"); - printf("variant of %s.\n", matchedDesc->gameid); - printf("If this is an original and unmodified version, please report any\n"); - printf("information previously printed by ScummVM to the team.\n"); + Common::String report = Common::String::format(_("Your game version has been detected using " + "filename matching as a variant of %s."), matchedDesc->gameid); + report += "\n"; + report += _("If this is an original and unmodified version, please report any"); + report += "\n"; + report += _("information previously printed by ScummVM to the team."); + report += "\n"; + g_system->logMessage(LogMessageType::kInfo, report.c_str()); } } |