当前位置: 首页>>代码示例>>Python>>正文


Python constants.VERSION类代码示例

本文整理汇总了Python中horizons.constants.VERSION的典型用法代码示例。如果您正苦于以下问题:Python VERSION类的具体用法?Python VERSION怎么用?Python VERSION使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了VERSION类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_option_parser

def get_option_parser():
	"""Returns inited OptionParser object"""
	from horizons.constants import VERSION
	p = optparse.OptionParser(usage="%prog [options]", version=VERSION.string())
	p.add_option("-d", "--debug", dest="debug", action="store_true", \
	             default=False, help=_("Enable debug output to stderr and a logfile."))
	p.add_option("--fife-path", dest="fife_path", metavar="<path>", \
	             help=_("Specify the path to FIFE root directory."))
	p.add_option("--restore-settings", dest="restore_settings", action="store_true", \
	             default=False, help=_("Restores the default settings. Useful if Unknown Horizons crashes on startup due to misconfiguration."))
	p.add_option("--mp-master", dest="mp_master", metavar="<ip:port>", \
	             help=_("Specify alternative multiplayer master server."))
	p.add_option("--mp-bind", dest="mp_bind", metavar="<ip:port>", \
	             help=_("Specify network address to bind local network client to. This is useful if NAT holepunching is not working but you can forward a static port."))


	start_uh_group = optparse.OptionGroup(p, _("Starting Unknown Horizons"))
	start_uh_group.add_option("--start-map", dest="start_map", metavar="<map>", \
	             help=_("Starts <map>. <map> is the mapname."))
	start_uh_group.add_option("--start-random-map", dest="start_random_map", action="store_true", \
	             help=_("Starts a random map."))
	start_uh_group.add_option("--start-specific-random-map", dest="start_specific_random_map", \
	             type="int", metavar="<seed>", help=_("Starts a random map with seed <seed>."))
	start_uh_group.add_option("--start-scenario", dest="start_scenario", metavar="<scenario>", \
	             help=_("Starts <scenario>. <scenario> is the scenarioname."))
	start_uh_group.add_option("--start-campaign", dest="start_campaign", metavar="<campaign>", \
	             help=_("Starts <campaign>. <campaign> is the campaign name."))
	start_uh_group.add_option("--start-dev-map", dest="start_dev_map", action="store_true", \
	             default=False, help=_("Starts the development map without displaying the main menu."))
	start_uh_group.add_option("--load-map", dest="load_map", metavar="<save>", \
	             help=_("Loads a saved game. <save> is the savegamename."))
	start_uh_group.add_option("--load-last-quicksave", dest="load_quicksave", action="store_true", \
	             help=_("Loads the last quicksave."))
	p.add_option_group(start_uh_group)

	dev_group = optparse.OptionGroup(p, _("Development options"))
	dev_group.add_option("--debug-log-only", dest="debug_log_only", action="store_true", \
	             default=False, help=_("Write debug output only to logfile, not to console. Implies -d."))
	dev_group.add_option("--debug-module", action="append", dest="debug_module", \
	             metavar="<module>", default=[], \
	             help=_("Enable logging for a certain logging module (for developing only)."))
	dev_group.add_option("--logfile", dest="logfile", metavar="<filename>",
	             help=_("Writes log to <filename> instead of to the uh-userdir"))
	dev_group.add_option("--fife-in-library-path", dest="fife_in_library_path", action="store_true", \
	             default=False, help=_("For internal use only."))
	dev_group.add_option("--profile", dest="profile", action="store_true", \
	             default=False, help=_("Enable profiling (for developing only)."))
	dev_group.add_option("--string-previewer", dest="stringpreview", action="store_true", \
	             default=False, help=_("Enable the string previewer tool for scenario writers"))
	p.add_option_group(dev_group)

	return p
开发者ID:court-jus,项目名称:unknown-horizons,代码行数:52,代码来源:run_uh.py

示例2: set_translations


#.........这里部分代码省略.........
		# (text of widget: lbl_SPEED_UP)
		("lbl_SPEED_UP"                , "text"    ): _("Increase game speed"),
		# (text of widget: lbl_TILE_OWNER_HIGHLIGHT)
		("lbl_TILE_OWNER_HIGHLIGHT"    , "text"    ): _("Highlight tile ownership"),
		# (text of widget: lbl_TRANSLUCENCY)
		("lbl_TRANSLUCENCY"            , "text"    ): _("Toggle translucency of ambient buildings"),
		# (text of widget: lbl_UP)
		("lbl_UP"                      , "text"    ): _("Scroll up"),
		# (tooltip of widget: okButton)
		("okButton"                    , "tooltip" ): _("Return"),
		# (text of widget: fife_and_uh_team)
		("fife_and_uh_team"            , "text"    ): _("The FIFE and Unknown Horizons development teams"),
		},

	"ingamemenu.xml" : {
		# (text of widget: help)
		("help"                        , "text"    ): _("Help"),
		# (text of widget: loadgame)
		("loadgame"                    , "text"    ): _("Load game"),
		# (text of widget: quit)
		("quit"                        , "text"    ): _("Cancel game"),
		# (text of widget: savegame)
		("savegame"                    , "text"    ): _("Save game"),
		# (text of widget: settings)
		("settings"                    , "text"    ): _("Settings"),
		# (text of widget: start)
		("start"                       , "text"    ): _("Return to game"),
		},

	"loadingscreen.xml" : {
		# (text of widget: loading_label)
		("loading_label"               , "text"    ): _("Loading ..."),
		# (text of widget: version_label)
		("version_label"               , "text"    ): VERSION.string(),
		},

	"mainmenu.xml" : {
		# (text of widget: chimebell)
		("chimebell"                   , "text"    ): _("Attention please!"),
		# (text of widget: credits)
		("credits"                     , "text"    ): _("Credits"),
		# (text of widget: help) Main / in-game menu entry
		("help"                        , "text"    ): _("Help"),
		# (text of widget: loadgame) Open a widget to select which game to load
		("loadgame"                    , "text"    ): _("Load game"),
		# (text of widget: quit) Completely shut down UH
		("quit"                        , "text"    ): _("Quit"),
		# (text of widget: settings) Main / in-game menu entry
		("settings"                    , "text"    ): _("Settings"),
		# (text of widget: start) Opens widget to create singleplayer games (campaigns, scenarios, random maps, free play)
		("start"                       , "text"    ): _("Singleplayer"),
		# (text of widget: start_multi) Opens widget to join or create multiplayer games
		("start_multi"                 , "text"    ): _("Multiplayer"),
		# (text of widget: version_label)
		("version_label"               , "text"    ): VERSION.string(),
		},

	"multiplayer_creategame.xml" : {
		# (text of widget: create_game_lbl)
		("create_game_lbl"             , "text"    ): _("Create game:"),
		# (text of widget: exit_to_mp_menu_lbl)
		("exit_to_mp_menu_lbl"         , "text"    ): _("Back:"),
		# (text of widget: headline)
		("headline"                    , "text"    ): _("Choose a map:"),
		# (text of widget: headline)
		("headline"                    , "text"    ): _("Create game - Multiplayer"),
开发者ID:perher,项目名称:unknown-horizons,代码行数:67,代码来源:guitranslations.py

示例3: get_option_parser

def get_option_parser():
	"""Returns inited OptionParser object"""
	from horizons.constants import VERSION
	p = optparse.OptionParser(usage="%prog [options]", version=VERSION.string())
	p.add_option("-d", "--debug", dest="debug", action="store_true",
	             default=False, help="Enable debug output to stderr and a logfile.")
	p.add_option("--fife-path", dest="fife_path", metavar="<path>",
	             help="Specify the path to FIFE root directory.")
	p.add_option("--restore-settings", dest="restore_settings", action="store_true", default=False,
	             help="Restores the default settings. "
	                  "Useful if Unknown Horizons crashes on startup due to misconfiguration.")
	p.add_option("--mp-master", dest="mp_master", metavar="<ip:port>",
	             help="Specify alternative multiplayer master server.")
	p.add_option("--mp-bind", dest="mp_bind", metavar="<ip:port>",
	             help="Specify network address to bind local network client to. "
	                  "This is useful if NAT holepunching is not working but you can forward a static port.")


	start_uh = optparse.OptionGroup(p, "Starting Unknown Horizons")
	start_uh.add_option("--start-map", dest="start_map", metavar="<map>",
	             help="Starts <map>. <map> is the mapname.")
	start_uh.add_option("--start-random-map", dest="start_random_map", action="store_true",
	             help="Starts a random map.")
	start_uh.add_option("--start-specific-random-map", dest="start_specific_random_map",
	             metavar="<seed>", help="Starts a random map with seed <seed>.")
	start_uh.add_option("--start-scenario", dest="start_scenario", metavar="<scenario>",
	             help="Starts <scenario>. <scenario> is the scenarioname.")
	start_uh.add_option("--start-dev-map", dest="start_dev_map", action="store_true",
	             default=False, help="Starts the development map without displaying the main menu.")
	start_uh.add_option("--load-game", dest="load_game", metavar="<game>",
	             help="Loads a saved game. <game> is the saved game's name.")
	start_uh.add_option("--load-last-quicksave", dest="load_quicksave", action="store_true",
	             help="Loads the last quicksave.")
	start_uh.add_option("--edit-map", dest="edit_map", metavar="<map>",
	             help="Edit map <map>.")
	start_uh.add_option("--edit-game-map", dest="edit_game_map", metavar="<game>",
	             help="Edit the map from the saved game <game>.")
	p.add_option_group(start_uh)

	ai_group = optparse.OptionGroup(p, "AI options")
	ai_group.add_option("--ai-players", dest="ai_players", metavar="<ai_players>",
	             type="int", default=0,
	             help="Uses <ai_players> AI players (excludes the possible human-AI hybrid; defaults to 0).")
	ai_group.add_option("--human-ai-hybrid", dest="human_ai", action="store_true",
	             help="Makes the human player a human-AI hybrid (for development only).")
	ai_group.add_option("--force-player-id", dest="force_player_id",
	             metavar="<force_player_id>", type="int", default=None,
	             help="Set the player with id <force_player_id> as the active (human) player.")
	ai_group.add_option("--ai-highlights", dest="ai_highlights", action="store_true",
	             help="Shows AI plans as highlights (for development only).")
	ai_group.add_option("--ai-combat-highlights", dest="ai_combat_highlights", action="store_true",
	             help="Highlights combat ranges for units controlled by AI Players (for development only).")
	p.add_option_group(ai_group)

	dev_group = optparse.OptionGroup(p, "Development options")
	dev_group.add_option("--debug-log-only", dest="debug_log_only", action="store_true",
	             default=False, help="Write debug output only to logfile, not to console. Implies -d.")
	dev_group.add_option("--debug-module", action="append", dest="debug_module",
	             metavar="<module>", default=[],
	             help="Enable logging for a certain logging module (for developing only).")
	dev_group.add_option("--logfile", dest="logfile", metavar="<filename>",
	             help="Writes log to <filename> instead of to the uh-userdir")
	dev_group.add_option("--profile", dest="profile", action="store_true",
	             default=False, help="Enable profiling (for developing only).")
	dev_group.add_option("--max-ticks", dest="max_ticks", metavar="<max_ticks>", type="int",
	             help="Run the game for <max_ticks> ticks.")
	dev_group.add_option("--no-freeze-protection", dest="freeze_protection", action="store_false",
	             default=True, help="Disable freeze protection.")
	dev_group.add_option("--string-previewer", dest="stringpreview", action="store_true",
	             default=False, help="Enable the string previewer tool for scenario writers")
	dev_group.add_option("--no-preload", dest="nopreload", action="store_true",
	             default=False, help="Disable preloading while in main menu")
	dev_group.add_option("--game-speed", dest="gamespeed", metavar="<game_speed>", type="float",
	             help="Run the game in the given speed (Values: 0.5, 1, 2, 3, 4, 6, 8, 11, 20)")
	dev_group.add_option("--gui-test", dest="gui_test", metavar="<test>",
	             default=False, help=optparse.SUPPRESS_HELP)
	dev_group.add_option("--gui-log", dest="log_gui", action="store_true",
	             default=False, help="Log gui interactions")
	dev_group.add_option("--sp-seed", dest="sp_seed", metavar="<seed>", type="int",
	             help="Use this seed for singleplayer sessions.")
	dev_group.add_option("--generate-minimap", dest="generate_minimap",
	             metavar="<parameters>", help=optparse.SUPPRESS_HELP)
	dev_group.add_option("--create-mp-game", action="store_true", dest="create_mp_game",
	             help="Create an multiplayer game with default settings.")
	dev_group.add_option("--join-mp-game", action="store_true", dest="join_mp_game",
	             help="Join first multiplayer game.")
	if VERSION.IS_DEV_VERSION:
		dev_group.add_option("--interactive-shell", action="store_true", dest="interactive_shell",
	             help="Starts an IPython kernel. Connect to the shell with: ipython console --existing")
		dev_group.add_option("--no-atlas-generation", action="store_false", dest="atlas_generation",
	             help="Disable atlas generation.")
	# Add dummy default variables for the DEV_VERSION groups above when in release mode
	p.set_defaults(interactive_shell=False, atlas_generation=True)
	p.add_option_group(dev_group)

	return p
开发者ID:Antagonym,项目名称:unknown-horizons,代码行数:96,代码来源:run_uh.py

示例4: set_translations


#.........这里部分代码省略.........
		# (text of widget: quit)
		(u'quit'                         , 'text'    ): _("Cancel game"),
		# (text of widget: savegame)
		(u'savegame'                     , 'text'    ): _("Save game"),
		# (text of widget: settings)
		(u'settings'                     , 'text'    ): _("Settings"),
		# (text of widget: start)
		(u'start'                        , 'text'    ): _("Return to game"),
		},

	'loadingscreen.xml' : {
		# (text of widget: loading_label)
		(u'loading_label'                , 'text'    ): _("Loading ..."),
		},

	'mainmenu.xml' : {
		# (text of widget: credits_label)
		(u'credits_label'                , 'text'    ): _("Credits"),
		# (text of widget: editor_label) Map editor
		(u'editor_label'                 , 'text'    ): _("Editor"),
		# (text of widget: help_label) Main / in-game menu entry
		(u'help_label'                   , 'text'    ): _("Help"),
		# (text of widget: load_label) Open a widget to select which game to load
		(u'load_label'                   , 'text'    ): _("Load game"),
		# (text of widget: multi_label) Opens widget to join or create multiplayer games
		(u'multi_label'                  , 'text'    ): _("Multiplayer"),
		# (text of widget: quit_label) Completely shut down UH
		(u'quit_label'                   , 'text'    ): _("Quit"),
		# (text of widget: settings_label) Main / in-game menu entry
		(u'settings_label'               , 'text'    ): _("Settings"),
		# (text of widget: single_label) Opens widget to create singleplayer games (scenarios, random maps, free play)
		(u'single_label'                 , 'text'    ): _("Singleplayer"),
		# (text of widget: version_label)
		(u'version_label'                , 'text'    ): VERSION.string(),
		},

	'multiplayer_creategame.xml' : {
		# (text of widget: create_game_lbl)
		(u'create_game_lbl'              , 'text'    ): _("Create game:"),
		# (text of widget: exit_to_mp_menu_lbl)
		(u'exit_to_mp_menu_lbl'          , 'text'    ): _("Back:"),
		# (text of widget: gamename_lbl)
		(u'gamename_lbl'                 , 'text'    ): _("Name of the game:"),
		# (text of widget: headline)
		(u'headline'                     , 'text'    ): _("Choose a map:"),
		# (text of widget: headline)
		(u'headline'                     , 'text'    ): _("Create game - Multiplayer"),
		# (text of widget: mp_player_limit_lbl)
		(u'mp_player_limit_lbl'          , 'text'    ): _("Player limit:"),
		# (text of widget: password_lbl)
		(u'password_lbl'                 , 'text'    ): _("Password of the game:"),
		# (helptext of widget: cancel)
		(u'cancel'                       , 'helptext'): _("Exit to multiplayer menu"),
		# (helptext of widget: create)
		(u'create'                       , 'helptext'): _("Create this new game"),
		# (helptext of widget: gamename_lbl)
		(u'gamename_lbl'                 , 'helptext'): _("This will be displayed to other players so they recognize the game."),
		# (helptext of widget: password_lbl)
		(u'password_lbl'                 , 'helptext'): _("This game's password. Required to join this game."),
		},

	'multiplayer_gamelobby.xml' : {
		# (text of widget: exit_to_mp_menu_lbl)
		(u'exit_to_mp_menu_lbl'          , 'text'    ): _("Leave:"),
		# (text of widget: game_player_color)
		(u'game_player_color'            , 'text'    ): _("Color"),
开发者ID:STEVEOO6,项目名称:unknown-horizons,代码行数:67,代码来源:guitranslations.py

示例5: set_translations

def set_translations():
	global text_translations
	text_translations = {
		"buildtab_increment0.xml" : {
			"companies_label"             : _("Companies"),
			"headline"                    : _("Sailor buildings"),
			"residents_infra_label"       : _("Residents and infrastructure"),
			"services_label"              : _("Services"),
			"church-1"                    : _("Pavilion: Fulfills religious needs of sailors."),
			"fisher-1"                    : _("Fisherman: Fishes the sea, produces food."),
			"hunter-1"                    : _("Hunter: Hunts wild forest animals, produces food."),
			"lighthouse-1"                : _("Signal fire: Allows the player to trade with the free trader."),
			"lumberjack-1"                : _("Lumberjack: Chops down trees and turns them into boards."),
			"main_square-1"               : _("Main square: Supplies citizens with goods."),
			"resident-1"                  : _("Tent: Houses your inhabitants."),
			"store-1"                     : _("Storage: Extends stock and provides collectors."),
			"street-1"                    : _("Trail: Needed for collecting goods."),
			"tree-1"                      : _("Tree")},
		"buildtab_increment1.xml" : {
			"companies_label"             : _("Companies"),
			"fields_label"                : _("Fields"),
			"headline"                    : _("Pioneer buildings"),
			"military_label"              : _("Military"),
			"services_label"              : _("Services"),
			"boat_builder-1"              : _("Boat builder: Builds boats and small ships. Built on coast."),
			"brickyard-1"                 : _("Brickyard: Turns clay into bricks."),
			"clay-pit-1"                  : _("Clay pit: Gets clay from deposit."),
			"distillery-1"                : _("Distillery: Turns sugar into liquor."),
			"herder-1"                    : _("Farm: Grows field crops and raises livestock."),
			"pasture-1"                   : _("Pasture: Raises sheep. Produces wool. Needs a farm."),
			"potatofield-1"               : _("Potato field: Yields food. Needs a farm."),
			"sugarfield-1"                : _("Sugarcane field: Used in liquor production. Needs a farm."),
			"villageschool-1"             : _("Village school: Provides education."),
			"weaver-1"                    : _("Weaver: Turns lamb wool into cloth.")},
		"buildtab_increment2.xml" : {
			"companies_label"             : _("Companies"),
			"headline"                    : _("Settler buildings"),
			"services_label"              : _("Services"),
			"charcoal-burning-1"          : _("Charcoal burning: Burns a lot of boards."),
			"iron-mine-1"                 : _("Iron mine: Gets iron ore from deposit."),
			"smeltery-1"                  : _("Smeltery: Refines all kind of ores."),
			"tavern-1"                    : _("Tavern: Provides get-together."),
			"toolmaker-1"                 : _("Toolmaker: Produces tools out of iron.")},
		"place_building.xml" : {
			"headline"                    : _("Build"),
			"running_costs_label"         : _("Running costs:")},
		"city_info.xml" : {
			"city_info_inhabitants"       : _("Inhabitants"),
			"city_name"                   : _("Click to change the name of your settlement.")},
		"menu_panel.xml" : {
			"destroy_tool"                : _("Destroy"),
			"build"                       : _("Build menu"),
			"gameMenuButton"              : _("Game menu"),
			"helpLink"                    : _("Help"),
			"logbook"                     : _("Captain's log")},
		"status.xml" : {
			"boards_icon"                 : _("Boards"),
			"bricks_icon"                 : _("Bricks"),
			"food_icon"                   : _("Food"),
			"textiles_icon"               : _("Textiles"),
			"tools_icon"                  : _("Tools")},
		"status_gold.xml" : {
			"gold_icon"                   : _("Gold")},
		"change_name.xml" : {
			"change_name_headline"        : _("Change name"),
			"enter_new_name_lbl"          : _("Enter new name:")},
		"chat.xml" : {
			"chat_lbl"                    : _("Enter your message:"),
			"headline"                    : _("Chat")},
		"buysellmenu.xml" : {
			"buy_label"                   : _("Buy resources"),
			"headline"                    : _("Buy or sell resources"),
			"legend_label"                : _("Legend:"),
			"sell_label"                  : _("Sell resources")},
		"overview_productionline.xml" : {
			"toggle_active_active"        : _("Pause production"),
			"toggle_active_inactive"      : _("Start production")},
		"captains_log.xml" : {
			"cancelButton"                : _("Leave Captain's log"),
			"backwardButton"              : _("Read prev. entries"),
			"forwardButton"               : _("Read next entries")},
		"configure_route.xml" : {
			"cancelButton"                : _("Exit"),
			"add_bo"                      : _("Add to list"),
			"start_route"                 : _("Start / Stop route")},
		"gamemenu.xml" : {
			"chimebell"                   : _("Attention please!"),
			"credits"                     : _("Credits"),
			"help"                        : _("Help"),
			"loadgame"                    : _("Load game"),
			"quit"                        : _("Cancel game"),
			"savegame"                    : _("Save game"),
			"settings"                    : _("Settings"),
			"start"                       : _("Return to game"),
			"version_label"               : VERSION.string()},
		"help.xml" : {
			"fife_and_uh_team_lbl"        : _("The FIFE and Unknown Horizons"),
			"fife_and_uh_team_lbl2"       : _("development teams"),
			"have_fun_lbl"                : _("Have fun."),
			"headline"                    : _("Key bindings"),
#.........这里部分代码省略.........
开发者ID:siddharthlatest,项目名称:unknown-horizons,代码行数:101,代码来源:guitranslations.py

示例6: set_translations


#.........这里部分代码省略.........
			"lbl_f2"                      : _("{F2} = Show player scores"),
			"lbl_f3"                      : _("{F3} = Show settlement list"),
			"lbl_f4"                      : _("{F4} = Show ship list"),
			"lbl_f5"                      : _("{F5} = Quicksave"),
			"lbl_f9"                      : _("{F9} = Quickload"),
			"lbl_fife_and_uh_team"        : _("The FIFE and Unknown Horizons development teams"),
			"lbl_g"                       : _("{G} = Toggle grid on/off"),
			"lbl_h"                       : _("{H} = Show coordinate values (Debug)"),
			"lbl_have_fun"                : _("Have fun."),
			"lbl_l"                       : _("{L} = Toggle Captain's log"),
			"lbl_left"                    : _("{LEFT} = Scroll left"),
			"lbl_minus"                   : _("{ - } = Decrease game speed"),
			"lbl_p"                       : _("{P} = Pause game"),
			"lbl_period"                  : _("{ . } = Rotate building right"),
			"lbl_plus"                    : _("{ + } = Increase game speed"),
			"lbl_right"                   : _("{RIGHT} = Scroll right"),
			"lbl_s"                       : _("{S} = Screenshot"),
			"lbl_shift"                   : _("{SHIFT} = Hold to place multiple buildings"),
			"lbl_t"                       : _("{T} = Toggle translucency of ambient buildings"),
			"lbl_up"                      : _("{UP} = Scroll up"),
			"lbl_x"                       : _("{X} = Enable destruct mode"),
			"okButton"                    : _("Return"),
			},
		"ingamemenu.xml" : {
			"help"                        : _("Help"),
			"loadgame"                    : _("Load game"),
			"quit"                        : _("Cancel game"),
			"savegame"                    : _("Save game"),
			"settings"                    : _("Settings"),
			"start"                       : _("Return to game"),
			},
		"loadingscreen.xml" : {
			"loading_label"               : _("Loading ..."),
			"version_label"               : VERSION.string(),
			},
		"mainmenu.xml" : {
			"chimebell"                   : _("Attention please!"),
			"credits"                     : _("Credits"),
			"help"                        : _("Help"),
			"loadgame"                    : _("Load game"),
			"quit"                        : _("Quit"),
			"settings"                    : _("Settings"),
			"start"                       : _("Singleplayer"),
			"start_multi"                 : _("Multiplayer"),
			"version_label"               : VERSION.string(),
			},
		"multiplayer_creategame.xml" : {
			"create_game_lbl"             : _("Create game:"),
			"exit_to_mp_menu_lbl"         : _("Back:"),
			"headline"                    : _("Choose a map:"),
			"headline"                    : _("Create game - Multiplayer"),
			"mp_player_limit_lbl"         : _("Player limit:"),
			"create"                      : _("Create this new game"),
			"cancel"                      : _("Exit to multiplayer menu"),
			},
		"multiplayer_gamelobby.xml" : {
			"exit_to_mp_menu_lbl"         : _("Leave:"),
			"game_start_notice"           : _("The game will start as soon as enough players have joined."),
			"headline"                    : _("Chat:"),
			"headline"                    : _("Gamelobby"),
			"startmessage"                : _("Game details:"),
			"cancel"                      : _("Exit gamelobby"),
			},
		"multiplayermenu.xml" : {
			"active_games_lbl"            : _("Active games:"),
			"create_game_lbl"             : _("Create game:"),
开发者ID:slbucur,项目名称:unknown-horizons,代码行数:67,代码来源:guitranslations.py

示例7: get_option_parser

def get_option_parser():
	"""Returns inited OptionParser object"""
	from horizons.constants import VERSION
	p = optparse.OptionParser(usage="%prog [options]", version=VERSION.string())
	p.add_option("-d", "--debug", dest="debug", action="store_true", \
				       default=False, help="Enable debug output to stderr and a logfile.")
	p.add_option("--fife-path", dest="fife_path", metavar="<path>", \
				       help="Specify the path to FIFE root directory.")
	p.add_option("--restore-settings", dest="restore_settings", action="store_true", \
				       default=False, help="Restores the default settings. Useful if Unknown Horizons crashes on startup due to misconfiguration.")
	p.add_option("--mp-master", dest="mp_master", metavar="<ip:port>", \
				       help="Specify alternative multiplayer master server.")
	p.add_option("--mp-bind", dest="mp_bind", metavar="<ip:port>", \
				       help="Specify network address to bind local network client to. This is useful if NAT holepunching is not working but you can forward a static port.")


	start_uh_group = optparse.OptionGroup(p, "Starting Unknown Horizons")
	start_uh_group.add_option("--start-map", dest="start_map", metavar="<map>", \
				                    help="Starts <map>. <map> is the mapname.")
	start_uh_group.add_option("--start-random-map", dest="start_random_map", action="store_true", \
				                    help="Starts a random map.")
	start_uh_group.add_option("--start-specific-random-map", dest="start_specific_random_map", metavar="<seed>", \
									help="Starts a random map with seed <seed>.")
	start_uh_group.add_option("--start-scenario", dest="start_scenario", metavar="<scenario>", \
				                    help="Starts <scenario>. <scenario> is the scenarioname.")
	start_uh_group.add_option("--start-campaign", dest="start_campaign", metavar="<campaign>", \
				                    help="Starts <campaign>. <campaign> is the campaign name.")
	start_uh_group.add_option("--start-dev-map", dest="start_dev_map", action="store_true", \
				                    default=False, help="Starts the development map without displaying the main menu.")
	start_uh_group.add_option("--load-map", dest="load_map", metavar="<save>", \
				                    help="Loads a saved game. <save> is the savegamename.")
	start_uh_group.add_option("--load-last-quicksave", dest="load_quicksave", action="store_true", \
				                    help="Loads the last quicksave.")
	start_uh_group.add_option("--nature-seed", dest="nature_seed", type="int", \
				                    help="Sets the seed used to generate trees, fish, and other natural resources.")
	p.add_option_group(start_uh_group)

	ai_group = optparse.OptionGroup(p, "AI options")
	ai_group.add_option("--ai-players", dest="ai_players", metavar="<ai_players>", type="int", default=0, \
	             help="Uses <ai_players> AI players (excludes the possible human-AI hybrid; defaults to 0).")
	ai_group.add_option("--human-ai-hybrid", dest="human_ai", action="store_true", \
	             help="Makes the human player a human-AI hybrid (for development only).")
	ai_group.add_option("--force-player-id", dest="force_player_id", metavar="<force_player_id>", type="int", default=None, \
	             help="Set the player with id <force_player_id> as the active (human) player.")
	ai_group.add_option("--ai-highlights", dest="ai_highlights", action="store_true", \
	             help="Shows AI plans as highlights (for development only).")
	p.add_option_group(ai_group)

	dev_group = optparse.OptionGroup(p, "Development options")
	dev_group.add_option("--debug-log-only", dest="debug_log_only", action="store_true", \
				               default=False, help="Write debug output only to logfile, not to console. Implies -d.")
	dev_group.add_option("--debug-module", action="append", dest="debug_module", \
				               metavar="<module>", default=[], \
				               help="Enable logging for a certain logging module (for developing only).")
	dev_group.add_option("--logfile", dest="logfile", metavar="<filename>",
				               help="Writes log to <filename> instead of to the uh-userdir")
	dev_group.add_option("--fife-in-library-path", dest="fife_in_library_path", action="store_true", \
				               default=False, help="For internal use only.")
	dev_group.add_option("--profile", dest="profile", action="store_true", \
				               default=False, help="Enable profiling (for developing only).")
	dev_group.add_option("--max-ticks", dest="max_ticks", metavar="<max_ticks>", type="int", \
				               help="Run the game for <max_ticks> ticks.")
	dev_group.add_option("--string-previewer", dest="stringpreview", action="store_true", \
				               default=False, help="Enable the string previewer tool for scenario writers")
	dev_group.add_option("--no-preload", dest="nopreload", action="store_true", \
				               default=False, help="Disable preloading while in main menu")
	dev_group.add_option("--game-speed", dest="gamespeed", metavar="<game_speed>", type="int", \
				               help="Run the game in the given speed (Values: 0.5, 1, 2, 3, 4, 6, 8, 11, 20)")
	dev_group.add_option("--gui-test", dest="gui_test", metavar="<test>", \
	                           default=False, help="INTERNAL. Use run_tests.py instead.")
	dev_group.add_option("--gui-log", dest="log_gui", action="store_true", default=False, help="Log gui interactions")
	dev_group.add_option("--sp-seed", dest="sp_seed", metavar="<seed>", type="int", \
	                           help="Use this seed for singleplayer sessions.")
	dev_group.add_option("--generate-minimap", dest="generate_minimap", \
	                     metavar="<parameters>", help="Generate a minimap for a map")
	dev_group.add_option("--create-mp-game", action="store_true", dest="create_mp_game", \
	                     help="Create an multiplayer game with default settings.")
	dev_group.add_option("--join-mp-game", action="store_true", dest="join_mp_game", \
	                     help="Join first multiplayer game.")
	dev_group.add_option("--interactive-shell", action="store_true", dest="interactive_shell",
	                     help="Starts an IPython kernel. Connect to the shell with: ipython console --existing")
	p.add_option_group(dev_group)

	return p
开发者ID:skeet70,项目名称:unknown-horizons,代码行数:84,代码来源:run_uh.py

示例8: set_translations

def set_translations():
	global text_translations
	text_translations = {
		"boatbuilder.xml" : {
			"boat_builder_window"         : _("boatbuilder")},
		"build_menu/hud_build_tab0.xml" : {
			"headline"                    : _("Sailor Buildings"),
			"residents_infra_label"       : _("Residents and Infrastructure"),
			"services_label"              : _("Services"),
			"companies_label"             : _("Companies"),
			"resident-1"                  : _("Tent: \nHouses your \ninhabitants."),
			"street-1"                    : _("Trail: \nNeeded for \ncollecting goods."),
			"main_square-1"               : _("Main square:\nSupplies citizens\nwith goods."),
			"store-1"                     : _("Storage: \nExtends stock\nand provides\ncollectors."),
			"church-1"                    : _("Pavilion: \nFulfills religious\nneeds of sailors."),
			"lighthouse-1"                : _("Signal fire: \nAllows the player\nto trade with\nthe free trader."),
			"lumberjack-1"                : _("Lumberjack: \nChops down trees\nand turns them\ninto boards."),
			"hunter-1"                    : _("Hunter: \nHunts wild\nforest animals,\nproduces food."),
			"fisher-1"                    : _("Fisherman: \nFishes the sea,\nproduces food."),
			"tree-1"                      : _("Tree")},
		"build_menu/hud_build_tab1.xml" : {
			"headline"                    : _("Pioneer Buildings"),
			"companies_label"             : _("Companies"),
			"services_label"              : _("Services"),
			"military_label"              : _("Military"),
			"herder-1"                    : _("Farm: \nGrows field \ncrops and raises \nlivestock."),
			"potatofield-1"               : _("Potato Field:\nDelivers food. \nNeeds a farm."),
			"pasture-1"                   : _("Pasture is used \nto grow sheep.\nProduces wool. \nNeeds a farm."),
			"weaver-1"                    : _("Weaver: \nTurns lamb wool \ninto cloth."),
			"clay-pit-1"                  : _("Clay Pit: \n Gets clay \nfrom deposit."),
			"brickyard-1"                 : _("Brickyard: \nTurns clay \ninto bricks."),
			"villageschool-1"             : _("Elementary school: \nProvides education."),
			"boat_builder-1"              : _("Boat builder: \nBuilds boats and\nsmall ships. \nBuilt on coast.")},
		"build_menu/hud_build_tab2.xml" : {
			"headline"                    : _("Settler Buildings"),
			"housing_label"               : _("Housing"),
			"production_label"            : _("Production"),
			"villageschool-1"             : _("Village school: \nProvides education."),
			"sugarfield-1"                : _("Sugar Field: \nProduces sugar\nfor rum.")},
		"build_menu/hud_build_tab3.xml" : {
			"headline"                    : _("Citizen Buildings")},
		"build_menu/hud_build_tab4.xml" : {
			"headline"                    : _("Merchant Buildings")},
		"build_menu/hud_build_tab5.xml" : {
			"headline"                    : _("Aristocrat Buildings")},
		"build_menu/hud_builddetail.xml" : {
			"headline"                    : _("Build"),
			"running_costs_label"         : _("Running Costs:")},
		"buildings_gui/production_building_overview.xml" : {
			"headline"                    : _("Building overview")},
		"buildings_gui/work_building_tab0.xml" : {
			"headline"                    : _("Building overview"),
			"name_label"                  : _("Name:"),
			"health_label"                : _("Health:"),
			"running_costs_label"         : _("Running Costs:"),
			"buy_sell_label"              : _("Buy/Sell Resources:")},
		"buildings_gui/work_building_tab1.xml" : {
			"StockLabel"                  : _("stock")},
		"buildings_gui/work_building_tab2.xml" : {
			"CombatLabel"                 : _("combat")},
		"buildings_gui/work_building_tab3.xml" : {
			"RouteLabel"                  : _("route")},
		"buildings_gui/work_building_tab4.xml" : {
			"ProductionLabel"             : _("production")},
		"buildings_gui/work_building_tab5.xml" : {
			"ResearchLabel"               : _("research")},
		"buysellmenu/buysellmenu.xml" : {
			"headline"                    : _("Buy or sell resources"),
			"legend_label"                : _("Legend:"),
			"buy_label"                   : _("Buy resources"),
			"sell_label"                  : _("Sell resources")},
		"buysellmenu/resources.xml" : {
			"headline"                    : _("Select resources:")},
		"captains_log.xml" : {
			"lbl_log"                     : _("Captain's Log")},
		"change_name.xml" : {
			"headline"                    : _("Change name"),
			"enter_new_name_lbl"          : _("Enter new name:")},
		"chat.xml" : {
			"headline"                    : _("Chat"),
			"chat_lbl"                    : _("Enter your message:")},
		"chime.xml" : {
			"headline"                    : _("Chime The Bell"),
			"made_it_label"               : _("Yeah, you made it..."),
			"deadlink_label"              : _("But this is a deadlink, sorry.")},
		"credits.xml" : {
			"headline"                    : _("Contributors"),
			"headline_projectcoord"       : _("PROJECT COORDINATION"),
			"headline_gamedesign"         : _("GAME-PLAY DESIGN"),
			"headline_programming"        : _("PROGRAMMING"),
			"headline_sfx"                : _("SOUND and MUSIC ARTISTS"),
			"headline_gfx"                : _("GRAPHIC ARTIST"),
			"headline_translation"        : _("TRANSLATION"),
			"headline_thanks"             : _("SPECIAL THANKS to:"),
			"fife_team_lbl"               : _("The FIFE team (www.fifengine.de)")},
		"gamemenu.xml" : {
			"version_label"               : VERSION.string(),
			"start"                       : _("Return to Game"),
			"quit"                        : _(" Cancel Game "),
			"savegame"                    : _(" Save Game "),
#.........这里部分代码省略.........
开发者ID:totycro,项目名称:unknown-horizons-quadtree,代码行数:101,代码来源:guitranslations.py


注:本文中的horizons.constants.VERSION类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。