X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsetup.cpp;h=a248d2cf66031f56ba96930985b05bf7cd4921a6;hb=828b5e1ef1cb89d830735f24dd79bbd9b09d5b32;hp=b5b30442ea2ef4e62ca40740d931bedd78fd5cfb;hpb=28dcc843a7500b395730e5f5eb821577f0b9d797;p=supertux.git diff --git a/src/setup.cpp b/src/setup.cpp index b5b30442e..a248d2cf6 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -52,6 +52,7 @@ #include "resources.h" #include "intro.h" #include "sound_manager.h" +#include "gettext.h" #include "player.h" @@ -384,67 +385,67 @@ void st_menu(void) worldmap_menu = new Menu(); main_menu->set_pos(screen->w/2, 335); - main_menu->additem(MN_GOTO, "Start Game",0,load_game_menu, MNID_STARTGAME); - main_menu->additem(MN_GOTO, "Contrib Levels",0,contrib_menu, MNID_CONTRIB); - main_menu->additem(MN_GOTO, "Options",0,options_menu, MNID_OPTIONMENU); - main_menu->additem(MN_ACTION,"Level Editor",0,0, MNID_LEVELEDITOR); - main_menu->additem(MN_ACTION,"Credits",0,0, MNID_CREDITS); - main_menu->additem(MN_ACTION,"Quit",0,0, MNID_QUITMAINMENU); - - options_menu->additem(MN_LABEL,"Options",0,0); + main_menu->additem(MN_GOTO, _("Start Game"),0,load_game_menu, MNID_STARTGAME); + main_menu->additem(MN_GOTO, _("Contrib Levels"),0,contrib_menu, MNID_CONTRIB); + main_menu->additem(MN_GOTO, _("Options"),0,options_menu, MNID_OPTIONMENU); + main_menu->additem(MN_ACTION, _("Level Editor"),0,0, MNID_LEVELEDITOR); + main_menu->additem(MN_ACTION, _("Credits"),0,0, MNID_CREDITS); + main_menu->additem(MN_ACTION, _("Quit"),0,0, MNID_QUITMAINMENU); + + options_menu->additem(MN_LABEL,_("Options"),0,0); options_menu->additem(MN_HL,"",0,0); #ifndef NOOPENGL - options_menu->additem(MN_TOGGLE,"OpenGL",use_gl,0, MNID_OPENGL); + options_menu->additem(MN_TOGGLE,_("OpenGL "),use_gl,0, MNID_OPENGL); #else - options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl, 0, MNID_OPENGL); + options_menu->additem(MN_DEACTIVE,_("OpenGL (not supported)"),use_gl, 0, MNID_OPENGL); #endif - options_menu->additem(MN_TOGGLE,"Fullscreen",use_fullscreen,0, MNID_FULLSCREEN); + options_menu->additem(MN_TOGGLE,_("Fullscreen"),use_fullscreen,0, MNID_FULLSCREEN); if(audio_device) { - options_menu->additem(MN_TOGGLE,"Sound ", use_sound,0, MNID_SOUND); - options_menu->additem(MN_TOGGLE,"Music ", use_music,0, MNID_MUSIC); + options_menu->additem(MN_TOGGLE,_("Sound "), use_sound,0, MNID_SOUND); + options_menu->additem(MN_TOGGLE,_("Music "), use_music,0, MNID_MUSIC); } else { - options_menu->additem(MN_DEACTIVE,"Sound ", false,0, MNID_SOUND); - options_menu->additem(MN_DEACTIVE,"Music ", false,0, MNID_MUSIC); + options_menu->additem(MN_DEACTIVE,_("Sound "), false,0, MNID_SOUND); + options_menu->additem(MN_DEACTIVE,_("Music "), false,0, MNID_MUSIC); } - options_menu->additem(MN_TOGGLE,"Show FPS ",show_fps,0, MNID_SHOWFPS); - options_menu->additem(MN_GOTO,"Keyboard Setup",0,options_keys_menu); + options_menu->additem(MN_TOGGLE,_("Show FPS "),show_fps,0, MNID_SHOWFPS); + options_menu->additem(MN_GOTO,_("Setup Keys"),0,options_keys_menu); if(use_joystick) - options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu); + options_menu->additem(MN_GOTO,_("Setup Joystick"),0,options_joystick_menu); options_menu->additem(MN_HL,"",0,0); - options_menu->additem(MN_BACK,"Back",0,0); + options_menu->additem(MN_BACK,_("Back"),0,0); - options_keys_menu->additem(MN_LABEL,"Key Setup",0,0); + options_keys_menu->additem(MN_LABEL,_("Keyboard Setup"),0,0); options_keys_menu->additem(MN_HL,"",0,0); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Left move", 0,0, 0,&keymap.left); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Right move", 0,0, 0,&keymap.right); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Jump", 0,0, 0,&keymap.jump); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Duck", 0,0, 0,&keymap.duck); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Activate", 0, 0, 0, + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Left move"), 0,0, 0,&keymap.left); + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Right move"), 0,0, 0,&keymap.right); + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Jump"), 0,0, 0,&keymap.jump); + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Duck"), 0,0, 0,&keymap.duck); + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Activate"), 0, 0, 0, &keymap.activate); - options_keys_menu->additem(MN_CONTROLFIELD_KB,"Power/Run", 0,0, 0,&keymap.fire); + options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Power/Run"), 0,0, 0,&keymap.fire); options_keys_menu->additem(MN_HL,"",0,0); - options_keys_menu->additem(MN_BACK,"Back",0,0); + options_keys_menu->additem(MN_BACK,_("Back"),0,0); if(use_joystick) { - options_joystick_menu->additem(MN_LABEL,"Joystick Setup",0,0); + options_joystick_menu->additem(MN_LABEL,_("Joystick Setup"),0,0); options_joystick_menu->additem(MN_HL,"",0,0); //options_joystick_menu->additem(MN_CONTROLFIELD_JS,"X axis", 0,0, 0,&joystick_keymap.x_axis); //options_joystick_menu->additem(MN_CONTROLFIELD_JS,"Y axis", 0,0, 0,&joystick_keymap.y_axis); - options_joystick_menu->additem(MN_CONTROLFIELD_JS,"A button", 0,0, 0,&joystick_keymap.a_button); - options_joystick_menu->additem(MN_CONTROLFIELD_JS,"B button", 0,0, 0,&joystick_keymap.b_button); + options_joystick_menu->additem(MN_CONTROLFIELD_JS,_("A button"), 0,0, 0,&joystick_keymap.a_button); + options_joystick_menu->additem(MN_CONTROLFIELD_JS,_("B button"), 0,0, 0,&joystick_keymap.b_button); //options_joystick_menu->additem(MN_CONTROLFIELD_JS,"Start", 0,0, 0,&joystick_keymap.start_button); //options_joystick_menu->additem(MN_CONTROLFIELD_JS,"DeadZone", 0,0, 0,&joystick_keymap.dead_zone); options_joystick_menu->additem(MN_HL,"",0,0); - options_joystick_menu->additem(MN_BACK,"Back",0,0); + options_joystick_menu->additem(MN_BACK,_("Back"),0,0); } - load_game_menu->additem(MN_LABEL,"Start Game",0,0); + load_game_menu->additem(MN_LABEL,_("Start Game"),0,0); load_game_menu->additem(MN_HL,"",0,0); load_game_menu->additem(MN_DEACTIVE,"Slot 1",0,0, 1); load_game_menu->additem(MN_DEACTIVE,"Slot 2",0,0, 2); @@ -452,9 +453,9 @@ void st_menu(void) load_game_menu->additem(MN_DEACTIVE,"Slot 4",0,0, 4); load_game_menu->additem(MN_DEACTIVE,"Slot 5",0,0, 5); load_game_menu->additem(MN_HL,"",0,0); - load_game_menu->additem(MN_BACK,"Back",0,0); + load_game_menu->additem(MN_BACK,_("Back"),0,0); - save_game_menu->additem(MN_LABEL,"Save Game",0,0); + save_game_menu->additem(MN_LABEL,_("Save Game"),0,0); save_game_menu->additem(MN_HL,"",0,0); save_game_menu->additem(MN_DEACTIVE,"Slot 1",0,0, 1); save_game_menu->additem(MN_DEACTIVE,"Slot 2",0,0, 2); @@ -464,21 +465,21 @@ void st_menu(void) save_game_menu->additem(MN_HL,"",0,0); save_game_menu->additem(MN_BACK,"Back",0,0); - game_menu->additem(MN_LABEL,"Pause",0,0); + game_menu->additem(MN_LABEL,_("Pause"),0,0); game_menu->additem(MN_HL,"",0,0); - game_menu->additem(MN_ACTION,"Continue",0,0,MNID_CONTINUE); - game_menu->additem(MN_GOTO,"Options",0,options_menu); + game_menu->additem(MN_ACTION,_("Continue"),0,0,MNID_CONTINUE); + game_menu->additem(MN_GOTO,_("Options"),0,options_menu); game_menu->additem(MN_HL,"",0,0); - game_menu->additem(MN_ACTION,"Abort Level",0,0,MNID_ABORTLEVEL); + game_menu->additem(MN_ACTION,_("Abort Level"),0,0,MNID_ABORTLEVEL); - worldmap_menu->additem(MN_LABEL,"Pause",0,0); + worldmap_menu->additem(MN_LABEL,_("Pause"),0,0); worldmap_menu->additem(MN_HL,"",0,0); - worldmap_menu->additem(MN_ACTION,"Continue",0,0,MNID_RETURNWORLDMAP); - worldmap_menu->additem(MN_GOTO,"Options",0,options_menu); + worldmap_menu->additem(MN_ACTION,_("Continue"),0,0,MNID_RETURNWORLDMAP); + worldmap_menu->additem(MN_GOTO,_("Options"),0,options_menu); worldmap_menu->additem(MN_HL,"",0,0); - worldmap_menu->additem(MN_ACTION,"Quit Game",0,0,MNID_QUITWORLDMAP); + worldmap_menu->additem(MN_ACTION,_("Quit Game"),0,0,MNID_QUITWORLDMAP); - highscore_menu->additem(MN_TEXTFIELD,"Enter your name:",0,0); + highscore_menu->additem(MN_TEXTFIELD,_("Enter your name:"),0,0); } void update_load_save_game_menu(Menu* pmenu) @@ -1032,14 +1033,14 @@ void parseargs(int argc, char * argv[]) } else if (strcmp(argv[i], "--help") == 0) { /* Show help: */ - puts("Super Tux " VERSION "\n" - " Please see the file \"README.txt\" for more details.\n"); - printf("Usage: %s [OPTIONS] FILENAME\n\n", argv[0]); - puts("Display Options:\n" + puts(_(" SuperTux " VERSION "\n" + " Please see the file \"README.txt\" for more details.\n")); + printf(_("Usage: %s [OPTIONS] FILENAME\n\n"), argv[0]); + puts(_("Display Options:\n" " --fullscreen Run in fullscreen mode.\n" - " --opengl If opengl support was compiled in, this will enable\n" - " the EXPERIMENTAL OpenGL mode.\n" - " --sdl Use non-opengl renderer\n" + " --opengl If OpenGL support was compiled in, this will tell\n" + " SuperTux to make use of it.\n" + " --sdl Use the SDL software graphical renderer\n" "\n" "Sound Options:\n" " --disable-sound If sound support was compiled in, this will\n" @@ -1057,7 +1058,7 @@ void parseargs(int argc, char * argv[]) " options, license and game controls.\n" " --usage Display a brief message summarizing command-line options.\n" " --version Display the version of SuperTux you're running.\n\n" - ); + )); exit(0); } else if (argv[i][0] != '-') @@ -1091,7 +1092,7 @@ void usage(char * prog, int ret) /* Display the usage message: */ - fprintf(fi, "Usage: %s [--fullscreen] [--opengl] [--disable-sound] [--disable-music] [--debug-mode] | [--usage | --help | --version] [--leveleditor] FILENAME\n", + fprintf(fi, _("Usage: %s [--fullscreen] [--opengl] [--disable-sound] [--disable-music] [--debug-mode] | [--usage | --help | --version] [--leveleditor] FILENAME\n"), prog);