diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:08:35 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-11 08:43:59 -0700 |
commit | 1ea7d80aff0961e6f55ee467b8cbe26d146828f8 (patch) | |
tree | 4e635e72541c3df3493a2a5871348f02b9f48bfe /src/main.cpp | |
parent | 4a41ce55224ad7b54c6b5ea78126d8d314f5ef41 (diff) | |
download | mana-1ea7d80aff0961e6f55ee467b8cbe26d146828f8.tar.gz mana-1ea7d80aff0961e6f55ee467b8cbe26d146828f8.tar.bz2 mana-1ea7d80aff0961e6f55ee467b8cbe26d146828f8.tar.xz mana-1ea7d80aff0961e6f55ee467b8cbe26d146828f8.zip |
Don't make log statements translatable
The log is mainly used to aid the developers, hence shouldn't be
translated to the user's local language. Also introduces unnecessary
work for all translators.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/main.cpp b/src/main.cpp index 80cff8d1..4f66e9da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -208,14 +208,14 @@ void setUpdatesDir() } else { - logger->log(_("Error: Invalid update host: %s"), updateHost.c_str()); + logger->log("Error: Invalid update host: %s", updateHost.c_str()); errorMessage = _("Invalid update host: ") + updateHost; state = ERROR_STATE; } } else { - logger->log(_("Warning: no protocol was specified for the update host")); + logger->log("Warning: no protocol was specified for the update host"); updates << "updates/" << updateHost << "/" << loginData.port; updatesDir = updates.str(); } @@ -240,14 +240,14 @@ void setUpdatesDir() if (!CreateDirectory(newDir.c_str(), 0) && GetLastError() != ERROR_ALREADY_EXISTS) { - logger->log(_("Error: %s can't be made, but doesn't exist!"), - newDir.c_str()); + logger->log("Error: %s can't be made, but doesn't exist!", + newDir.c_str()); errorMessage = _("Error creating updates directory!"); state = ERROR_STATE; } #else - logger->log(_("Error: %s/%s can't be made, but doesn't exist!"), - homeDir.c_str(), updatesDir.c_str()); + logger->log("Error: %s/%s can't be made, but doesn't exist!", + homeDir.c_str(), updatesDir.c_str()); errorMessage = _("Error creating updates directory!"); state = ERROR_STATE; #endif @@ -286,13 +286,13 @@ void init_engine(const Options &options) logger->setLogFile(homeDir + std::string("/aethyra.log")); #ifdef PACKAGE_VERSION - logger->log(_("Starting Aethyra Version %s"), PACKAGE_VERSION); + logger->log("Starting Aethyra Version %s", PACKAGE_VERSION); #else - logger->log(_("Starting Aethyra - Version not defined")); + logger->log("Starting Aethyra - Version not defined")); #endif // Initialize SDL - logger->log(_("Initializing SDL...")); + logger->log("Initializing SDL..."); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { std::cerr << _("Could not initialize SDL: ") << SDL_GetError() << std::endl; @@ -337,7 +337,7 @@ void init_engine(const Options &options) #endif // Fill configuration with defaults - logger->log(_("Initializing configuration...")); + logger->log("Initializing configuration..."); config.setValue("host", "www.aethyra.org"); config.setValue("port", 21001); config.setValue("hwaccel", 0); @@ -451,7 +451,7 @@ void init_engine(const Options &options) catch (const char *err) { state = ERROR_STATE; errorMessage = err; - logger->log(_("Warning: %s"), err); + logger->log("Warning: %s", err); } // Initialize keyboard @@ -497,7 +497,8 @@ void printHelp() << _("Options: ") << std::endl << _(" -C --configfile : Configuration file to use") << std::endl << _(" -d --data : Directory to load game data from") << std::endl - << _(" -D --default : Bypass the login process with default settings") << std::endl + << _(" -D --default : Bypass the login process with default settings") + << std::endl << _(" -h --help : Display this help") << std::endl << _(" -H --updatehost : Use this update host") << std::endl << _(" -p --playername : Login with this player") << std::endl @@ -610,8 +611,8 @@ struct ErrorListener : public gcn::ActionListener // TODO Find some nice place for these functions void accountLogin(Network *network, LoginData *loginData) { - logger->log(_("Trying to connect to account server...")); - logger->log(_("Username is %s"), loginData->username.c_str()); + logger->log("Trying to connect to account server..."); + logger->log("Username is %s", loginData->username.c_str()); network->connect(loginData->hostname, loginData->port); network->registerHandler(&loginHandler); loginHandler.setLoginData(loginData); @@ -665,7 +666,7 @@ void positionDialog(Window *dialog, int screenWidth, int screenHeight) void charLogin(Network *network, LoginData *loginData) { - logger->log(_("Trying to connect to char server...")); + logger->log("Trying to connect to char server..."); network->connect(loginData->hostname, loginData->port); network->registerHandler(&charServerHandler); charServerHandler.setCharInfo(&charInfo); @@ -677,7 +678,8 @@ void charLogin(Network *network, LoginData *loginData) outMsg.writeInt32(loginData->account_ID); outMsg.writeInt32(loginData->session_ID1); outMsg.writeInt32(loginData->session_ID2); - // [Fate] The next word is unused by the old char server, so we squeeze in tmw client version information + // [Fate] The next word is unused by the old char server, so we squeeze in + // tmw client version information outMsg.writeInt16(CLIENT_PROTOCOL_VERSION); outMsg.writeInt8(loginData->sex); @@ -687,14 +689,14 @@ void charLogin(Network *network, LoginData *loginData) void mapLogin(Network *network, LoginData *loginData) { - logger->log(_("Memorizing selected character %s"), + logger->log("Memorizing selected character %s", player_node->getName().c_str()); config.setValue("lastCharacter", player_node->getName()); MessageOut outMsg(network); - logger->log(_("Trying to connect to map server...")); - logger->log(_("Map: %s"), map_path.c_str()); + logger->log("Trying to connect to map server..."); + logger->log("Map: %s", map_path.c_str()); network->connect(loginData->hostname, loginData->port); network->registerHandler(&mapLoginHandler); @@ -824,7 +826,7 @@ int main(int argc, char *argv[]) login_wallpaper = ResourceManager::getInstance()-> getImage(wallpaperName); if (!login_wallpaper) - logger->log(_("Couldn't load %s as wallpaper"), wallpaperName.c_str()); + logger->log("Couldn't load %s as wallpaper", wallpaperName.c_str()); while (state != EXIT_STATE) { |