cleaned up translatable strings

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1706 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2008-04-21 00:09:23 +00:00
parent dd253390fb
commit b59a7f32d8
11 changed files with 55 additions and 55 deletions

View File

@ -57,9 +57,9 @@ CreditsMenu::CreditsMenu()
}
else
{
printf(_("Couldn't load '%s'\n"),filename.c_str());
credits_text.append(_("CREDIT file was not installed properly!!\n"));
credits_text.append(_("Please check 'data/CREDITS'!!"));
printf("Couldn't load '%s'\n",filename.c_str());
credits_text.append("CREDIT file was not installed properly!!\n");
credits_text.append("Please check 'data/CREDITS'!!");
}

View File

@ -245,7 +245,7 @@ void HerringManager::cleanup()
}
catch(std::runtime_error)
{
fprintf(stderr,_("The herring style '%s' in your configuration file does not exist.\nIt is ignored.\n"),
fprintf(stderr,"The herring style '%s' in your configuration file does not exist.\nIt is ignored.\n",
user_config->m_herring_style.c_str());
user_config->m_herring_style="";
}
@ -256,7 +256,7 @@ void HerringManager::cleanup()
}
catch(std::runtime_error)
{
fprintf(stderr,_("The herring style '%s' specified on the command line does not exist.\nIt is ignored.\n"),
fprintf(stderr,"The herring style '%s' specified on the command line does not exist.\nIt is ignored.\n",
m_user_filename.c_str());
m_user_filename=""; // reset to avoid further warnings.
}
@ -341,7 +341,7 @@ void HerringManager::loadHerringStyle(const std::string filename)
if(!herring_node)
{
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg), _("Couldn't load map '%s': no herring node."),
snprintf(msg, sizeof(msg), "Couldn't load map '%s': no herring node.",
filename.c_str());
delete root;
throw std::runtime_error(msg);

View File

@ -122,7 +122,7 @@ void HighscoreManager::Load()
m_allScores.push_back(highscores);
highscores->Read(node_record);
}
fprintf(stderr, _("Highscores will be saved in '%s'.\n"),m_filename.c_str());
fprintf(stderr, "Highscores will be saved in '%s'.\n",m_filename.c_str());
}
catch(std::exception& err)
{

View File

@ -102,7 +102,7 @@ const int KartPropertiesManager::getKartId(const std::string IDENT)
}
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg), _("KartPropertiesManager: Couldn't find kart: '%s'"),
snprintf(msg, sizeof(msg), "KartPropertiesManager: Couldn't find kart: '%s'",
IDENT.c_str());
throw std::runtime_error(msg);
} // getKartId

View File

@ -52,7 +52,7 @@ namespace lisp
{
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg),
_("Couldn't open file '%s'."),
"Couldn't open file '%s'.",
filename.c_str());
throw std::runtime_error(msg);
}

View File

@ -47,7 +47,7 @@ namespace lisp
{
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg),
_("LispWriter Error: Couldn't open file '%s' for writing."),
"LispWriter Error: Couldn't open file '%s' for writing.",
filename.c_str());
throw std::runtime_error(msg);
}

View File

@ -78,7 +78,7 @@
void cmdLineHelp (char* invocation)
{
fprintf ( stdout,
_("Usage: %s [OPTIONS]\n\n"
"Usage: %s [OPTIONS]\n\n"
"Run SuperTuxKart, a racing game with go-kart that features"
" the Tux and friends.\n\n"
"Options:\n"
@ -109,7 +109,7 @@ void cmdLineHelp (char* invocation)
" -h, --help Show this help\n"
"\n"
"You can visit SuperTuxKart's homepage at "
"http://supertuxkart.berlios.de\n\n"), invocation
"http://supertuxkart.berlios.de\n\n", invocation
);
} // cmdLineHelp
@ -122,8 +122,8 @@ int handleCmdLine(int argc, char **argv)
if(argv[i][0] != '-') continue;
if ( !strcmp(argv[i], "--help" ) ||
!strcmp(argv[i], "-help" ) ||
!strcmp(argv[i], _("--help") ) ||
!strcmp(argv[i], _("-help" ) ) ||
!strcmp(argv[i], "--help" ) ||
!strcmp(argv[i], "-help" ) ||
!strcmp(argv[i], "-h") )
{
cmdLineHelp(argv[0]);
@ -151,11 +151,11 @@ int handleCmdLine(int argc, char **argv)
if(filename!="")
{
race_manager->setPlayerKart(0, argv[i+1]);
fprintf ( stdout, _("You choose to use kart '%s'.\n"), argv[i+1] ) ;
fprintf ( stdout, "You choose to use kart '%s'.\n", argv[i+1] ) ;
}
else
{
fprintf(stdout, _("Kart '%s' not found, ignored.\n"),
fprintf(stdout, "Kart '%s' not found, ignored.\n",
argv[i+1]);
}
}
@ -178,36 +178,36 @@ int handleCmdLine(int argc, char **argv)
&& i+1<argc )
{
race_manager->setTrack(argv[i+1]);
fprintf ( stdout, _("You choose to start in track: %s.\n"), argv[i+1] ) ;
fprintf ( stdout, "You choose to start in track: %s.\n", argv[i+1] ) ;
}
else if( (!strcmp(argv[i], "--stk-config")) && i+1<argc )
{
stk_config->load(file_manager->getConfigFile(argv[i+1]));
fprintf ( stdout, _("STK config will be read from %s.\n"), argv[i+1] ) ;
fprintf ( stdout, "STK config will be read from %s.\n", argv[i+1] ) ;
}
else if( (!strcmp(argv[i], "--numkarts") || !strcmp(argv[i], "-k")) &&
i+1<argc )
{
user_config->m_karts = atoi(argv[i+1]);
if(user_config->m_karts>stk_config->m_max_karts) {
fprintf(stdout, _("Number of karts reset to maximum number %d\n"),
fprintf(stdout, "Number of karts reset to maximum number %d\n",
stk_config->m_max_karts);
user_config->m_karts = stk_config->m_max_karts;
}
race_manager->setNumKarts(user_config->m_karts );
fprintf ( stdout, _("%d karts will be used.\n"), user_config->m_karts);
fprintf ( stdout, "%d karts will be used.\n", user_config->m_karts);
i++;
}
else if( !strcmp(argv[i], "--list-tracks") || !strcmp(argv[i], "-l") )
{
fprintf ( stdout, _(" Available tracks:\n") );
fprintf ( stdout, " Available tracks:\n" );
for (size_t i = 0; i != track_manager->getTrackCount(); i++)
fprintf ( stdout, "\t%10s: %s\n",
track_manager->getTrack(i)->getIdent().c_str(),
track_manager->getTrack(i)->getName());
fprintf ( stdout, _("Use --track N to choose track.\n\n"));
fprintf ( stdout, "Use --track N to choose track.\n\n");
delete track_manager;
track_manager = 0;
@ -218,7 +218,7 @@ int handleCmdLine(int argc, char **argv)
bool dont_load_models=true;
kart_properties_manager->loadKartData(dont_load_models) ;
fprintf ( stdout, _(" Available karts:\n") );
fprintf ( stdout, " Available karts:\n" );
for (unsigned int i = 0; NULL != kart_properties_manager->getKartById(i); i++)
{
const KartProperties* KP= kart_properties_manager->getKartById(i);
@ -239,7 +239,7 @@ int handleCmdLine(int argc, char **argv)
else if ( !strcmp(argv[i], "--mirror") )
{
#ifdef SSG_BACKFACE_COLLISIONS_SUPPORTED
fprintf ( stdout, _("Enabling mirror mode.\n") ) ;
fprintf ( stdout, "Enabling mirror mode.\n" ) ;
//raceSetup.mirror = 1;
#else
//raceSetup.mirror = 0 ;
@ -248,7 +248,7 @@ int handleCmdLine(int argc, char **argv)
}
else if ( !strcmp(argv[i], "--laps") && i+1<argc )
{
fprintf ( stdout, _("You choose to have %d laps.\n"), atoi(argv[i+1]) ) ;
fprintf ( stdout, "You choose to have %d laps.\n", atoi(argv[i+1]) ) ;
race_manager->setNumLaps(atoi(argv[i+1]));
}
/* FIXME:
@ -262,7 +262,7 @@ int handleCmdLine(int argc, char **argv)
cmdLineHelp(argv[0]);
return 0;
}
fprintf ( stdout, _("You choose to have %d players.\n"), atoi(argv[i+1]) ) ;
fprintf ( stdout, "You choose to have %d players.\n", atoi(argv[i+1]) ) ;
}
*/
#if !defined(WIN32) && !defined(__CYGWIN)
@ -276,7 +276,7 @@ int handleCmdLine(int argc, char **argv)
user_config->m_blacklist_res.end(),res) == user_config->m_blacklist_res.end())
user_config->m_fullscreen = true;
else
fprintf ( stdout, _("Resolution %s has been blacklisted, so it is not available!\n"), res.c_str());
fprintf ( stdout, "Resolution %s has been blacklisted, so it is not available!\n", res.c_str());
}
else if ( !strcmp(argv[i], "--windowed") || !strcmp(argv[i], "-w"))
{
@ -297,15 +297,15 @@ int handleCmdLine(int argc, char **argv)
{
user_config->m_prev_width = user_config->m_width = width;
user_config->m_prev_height = user_config->m_height = height;
fprintf ( stdout, _("You choose to be in %dx%d.\n"), user_config->m_width,
fprintf ( stdout, "You choose to be in %dx%d.\n", user_config->m_width,
user_config->m_height );
}
else
fprintf ( stdout, _("Resolution %s has been blacklisted, so it is not available!\n"), res.c_str());
fprintf ( stdout, "Resolution %s has been blacklisted, so it is not available!\n", res.c_str());
}
else
{
fprintf(stderr, _("Error: --screensize argument must be given as WIDTHxHEIGHT\n"));
fprintf(stderr, "Error: --screensize argument must be given as WIDTHxHEIGHT\n");
exit(EXIT_FAILURE);
}
}
@ -354,7 +354,7 @@ int handleCmdLine(int argc, char **argv)
}
else
{
fprintf ( stderr, _("Invalid parameter: %s.\n\n"), argv[i] );
fprintf ( stderr, "Invalid parameter: %s.\n\n", argv[i] );
cmdLineHelp(argv[0]);
return 0;
}
@ -512,7 +512,7 @@ int main(int argc, char *argv[] )
catch (std::exception &e)
{
fprintf(stderr,e.what());
fprintf(stderr,_("\nAborting SuperTuxKart\n"));
fprintf(stderr,"\nAborting SuperTuxKart\n");
}
/* Program closing...*/

View File

@ -78,7 +78,7 @@ void MovingTexture::parseData(char *data)
if ( sscanf ( s, "C=%f", & f ) == 1 ) m_cycle = f ; else
if ( sscanf ( s, "M=%f", & f ) == 1 ) m_mode = (int) f ; else
if ( sscanf ( s, "O=%f", & f ) == 1 ) m_phase = f ; else
fprintf ( stderr, _("Unrecognised @autodcs string: '%s'\n"), data );
fprintf ( stderr, "Unrecognised @autodcs string: '%s'\n", data );
} // while s!=NULL&&s!='\0'
} // parseData

View File

@ -52,7 +52,7 @@ SoundManager::SoundManager() : m_sfxs(NUM_SOUNDS)
m_initialized = true;
else
{
fprintf(stderr, _("WARNING: Could not initialize the ALUT based sound.\n"));
fprintf(stderr, "WARNING: Could not initialize the ALUT based sound.\n");
m_initialized = false;
}

View File

@ -316,13 +316,13 @@ int UserConfig::CheckAndCreateDir()
#endif
if(bError)
{
fprintf(stderr, _("Couldn't create '%s', config files will not be saved.\n"),
fprintf(stderr, "Couldn't create '%s', config files will not be saved.\n",
DIRNAME.c_str());
return 0;
}
else
{
printf(_("Config directory '%s' successfully created.\n"),DIRNAME.c_str());
printf("Config directory '%s' successfully created.\n",DIRNAME.c_str());
return 2;
}
@ -348,7 +348,7 @@ void UserConfig::loadConfig(const std::string& filename)
catch(std::exception& e)
{
(void)e; // avoid warning about unreferenced local variable
printf(_("Config file '%s' does not exist, it will be created.\n"),
printf("Config file '%s' does not exist, it will be created.\n",
filename.c_str());
delete root;
return;
@ -360,7 +360,7 @@ void UserConfig::loadConfig(const std::string& filename)
if(!lisp)
{
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg), _("No tuxkart-config node"));
snprintf(msg, sizeof(msg), "No tuxkart-config node");
throw std::runtime_error(msg);
}
int configFileVersion = 0;
@ -369,34 +369,34 @@ void UserConfig::loadConfig(const std::string& filename)
{
// Give some feedback to the user about what was changed.
// Do NOT add a break after the case, so that all changes will be printed
printf(_("\nConfig file version '%d' is too old.\n"
"The following changes have been applied in the current SuperTuxKart version:\n"),
printf("\nConfig file version '%d' is too old.\n"
"The following changes have been applied in the current SuperTuxKart version:\n",
configFileVersion);
int needToAbort=0;
switch(configFileVersion)
{
case 0: printf(_("- Single window menu, old status display,new keyboard style settings were removed\n"));
case 0: printf("- Single window menu, old status display,new keyboard style settings were removed\n");
needToAbort=std::max(needToAbort,0);
case 1: printf(_("- Key bindings were changed, please check the settings. All existing values were discarded.\n"));
case 1: printf("- Key bindings were changed, please check the settings. All existing values were discarded.\n");
needToAbort=std::max(needToAbort,1);// old keybinds wouldn't make any sense
case 2: printf(_("Added username, using: '%s'.\n"), m_username.c_str());
case 2: printf("Added username, using: '%s'.\n", m_username.c_str());
needToAbort=std::max(needToAbort,0);
case 3: printf(_("Added username for all players.\n"));
case 3: printf("Added username for all players.\n");
needToAbort=std::max(needToAbort,0);
case 4: printf(_("Added jumping, which invalidates all key bindings.\n"));
case 4: printf("Added jumping, which invalidates all key bindings.\n");
needToAbort=std::max(needToAbort,0);
case 99: break;
default: printf(_("Config file version '%d' is too old. Discarding your configuration. Sorry. :(\n"), configFileVersion);
default: printf("Config file version '%d' is too old. Discarding your configuration. Sorry. :(\n", configFileVersion);
needToAbort=1;
break;
}
if(needToAbort)
{
printf(_("The old config file is deleted, a new one will be created.\n"));
printf("The old config file is deleted, a new one will be created.\n");
delete root;
return;
}
printf(_("This warning can be ignored, the config file will be automatically updated.\n"));
printf("This warning can be ignored, the config file will be automatically updated.\n");
// Keep on reading the config files as far as possible
} // if configFileVersion<SUPPORTED_CONFIG_VERSION
@ -449,7 +449,7 @@ void UserConfig::loadConfig(const std::string& filename)
if(!reader)
{
char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg), _("No '%s' node"), temp.c_str());
snprintf(msg, sizeof(msg), "No '%s' node", temp.c_str());
throw std::runtime_error(msg);
}
std::string name;
@ -497,7 +497,7 @@ void UserConfig::loadConfig(const std::string& filename)
}
catch(std::exception& e)
{
fprintf(stderr, _("Error while parsing config '%s':\n"), filename.c_str());
fprintf(stderr, "Error while parsing config '%s':\n", filename.c_str());
fprintf(stderr, e.what());
fprintf(stderr, "\n");
}
@ -714,7 +714,7 @@ void UserConfig::saveConfig(const std::string& filename)
}
catch(std::exception& e)
{
fprintf(stderr, _("Couldn't write config: "));
fprintf(stderr, "Couldn't write config: ");
fprintf(stderr, e.what());
fprintf(stderr, "\n");
}
@ -829,7 +829,7 @@ std::string UserConfig::getInputAsString(Input &input)
snprintf(msg, sizeof(msg), _("not set"));
break;
case IT_KEYBOARD:
snprintf(msg, sizeof(msg), _("%s"), SDL_GetKeyName((SDLKey) input.id0));
snprintf(msg, sizeof(msg), "%s", SDL_GetKeyName((SDLKey) input.id0));
break;
case IT_STICKMOTION:
snprintf(msg, sizeof(msg), _("joy %d axis %d %c"),

View File

@ -336,7 +336,7 @@ bool World::saveReplayHumanReadable( std::string const &filename ) const
FILE *fd = fopen( path.c_str(), "w" );
if( !fd )
{
fprintf(stderr, _("Error while opening replay file for writing '%s'\n"), path.c_str());
fprintf(stderr, "Error while opening replay file for writing '%s'\n", path.c_str());
return false;
}
int nKarts = world->getNumKarts();
@ -382,14 +382,14 @@ bool World::loadReplayHumanReadable( std::string const &filename )
}
catch(std::runtime_error& e)
{
fprintf( stderr, _("Couldn't find replay-file: '%s'\n"), path.c_str() );
fprintf( stderr, "Couldn't find replay-file: '%s'\n", path.c_str() );
return false;
}
FILE *fd = fopen( path.c_str(), "r" );
if( !fd )
{
fprintf(stderr, _("Error while opening replay file for loading '%s'\n"), path.c_str());
fprintf(stderr, "Error while opening replay file for loading '%s'\n", path.c_str());
return false;
}