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


Python VERSION.string方法代码示例

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


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

示例1: get_option_parser

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
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,代码行数:54,代码来源:run_uh.py

示例2: set_translations

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]

#.........这里部分代码省略.........
		# (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,代码行数:70,代码来源:guitranslations.py

示例3: get_option_parser

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
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,代码行数:98,代码来源:run_uh.py

示例4: set_translations

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
def set_translations():
	global text_translations
	text_translations = {

	'stringpreviewwidget.xml' : {
		},

	'editor_pause_menu.xml' : {
		# (text of widget: help)
		(u'help'                         , 'text'    ): _("Help"),
		# (text of widget: loadgame)
		(u'loadgame'                     , 'text'    ): _("Load map"),
		# (text of widget: quit)
		(u'quit'                         , 'text'    ): _("Exit editor"),
		# (text of widget: savegame)
		(u'savegame'                     , 'text'    ): _("Save map"),
		# (text of widget: settings)
		(u'settings'                     , 'text'    ): _("Settings"),
		# (text of widget: start)
		(u'start'                        , 'text'    ): _("Return to editor"),
		},

	'editor_settings.xml' : {
		# (text of widget: cursor_hint)
		(u'cursor_hint'                  , 'text'    ): _("(right click to stop)"),
		# (text of widget: headline_brush_size)
		(u'headline_brush_size'          , 'text'    ): _("Select brush size:"),
		# (text of widget: headline_terrain)
		(u'headline_terrain'             , 'text'    ): _("Select terrain:"),
		},

	'buildtab.xml' : {
		},

	'buildtab_no_settlement.xml' : {
		# (text of widget: headline)
		(u'headline'                     , 'text'    ): _("Game start"),
		# (text of widget: howto_1_need_warehouse)
		(u'howto_1_need_warehouse'       , 'text'    ): _("You need to found a settlement before you can construct buildings!"),
		# (text of widget: howto_2_navigate_ship)
		(u'howto_2_navigate_ship'        , 'text'    ): _("Select your ship and approach the coast via right-click."),
		# (text of widget: howto_3_build_warehouse)
		(u'howto_3_build_warehouse'      , 'text'    ): _("Afterwards, press the large button in the ship overview tab."),
		},

	'place_building.xml' : {
		# (text of widget: headline)
		(u'headline'                     , 'text'    ): _("Build"),
		# (text of widget: running_costs_label)
		(u'running_costs_label'          , 'text'    ): _("Running costs:"),
		},

	'related_buildings.xml' : {
		# (text of widget: headline)
		(u'headline'                     , 'text'    ): _("Related buildings"),
		},

	'city_info.xml' : {
		# (helptext of widget: city_info_inhabitants)
		(u'city_info_inhabitants'        , 'helptext'): _("Inhabitants"),
		},

	'messagewidget_icon.xml' : {
		},

	'messagewidget_message.xml' : {
		},

	'minimap.xml' : {
		# (helptext of widget: build)
		(u'build'                        , 'helptext'): _("Build menu (B)"),
		# (helptext of widget: destroy_tool)
		(u'destroy_tool'                 , 'helptext'): _("Destroy (X)"),
		# (helptext of widget: diplomacyButton)
		(u'diplomacyButton'              , 'helptext'): _("Diplomacy"),
		# (helptext of widget: gameMenuButton)
		(u'gameMenuButton'               , 'helptext'): _("Game menu (Esc)"),
		# (helptext of widget: logbook)
		(u'logbook'                      , 'helptext'): _("Captain's log (L)"),
		# (helptext of widget: rotateLeft)
		(u'rotateLeft'                   , 'helptext'): _("Rotate map counterclockwise (,)"),
		# (helptext of widget: rotateRight)
		(u'rotateRight'                  , 'helptext'): _("Rotate map clockwise (.)"),
		# (helptext of widget: speedDown)
		(u'speedDown'                    , 'helptext'): _("Decrease game speed (-)"),
		# (helptext of widget: speedUp)
		(u'speedUp'                      , 'helptext'): _("Increase game speed (+)"),
		# (helptext of widget: zoomIn)
		(u'zoomIn'                       , 'helptext'): _("Zoom in"),
		# (helptext of widget: zoomOut)
		(u'zoomOut'                      , 'helptext'): _("Zoom out"),
		},

	'resource_overview_bar_entry.xml' : {
		},

	'resource_overview_bar_gold.xml' : {
		},

	'resource_overview_bar_stats.xml' : {
#.........这里部分代码省略.........
开发者ID:STEVEOO6,项目名称:unknown-horizons,代码行数:103,代码来源:guitranslations.py

示例5: set_translations

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
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,代码行数:103,代码来源:guitranslations.py

示例6: set_translations

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
def set_translations():
	global text_translations
	text_translations = {
		"stringpreviewwidget.xml" : {
			"headline"                    : _("String Previewer Tool for Scenario files"),
			"hintlbl"                     : _("select a scenario and click on load/reload to update the messages in the captain's log"),
			"load"                        : _("load/reload"),
			},
		"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."),
			"tower-1"                     : _("Wooden tower: Defends your settlement."),
			"villageschool-1"             : _("Village school: Provides education."),
			"weaver-1"                    : _("Weaver: Turns lamb wool into cloth."),
			},
		"buildtab_increment2.xml" : {
			"companies_label"             : _("Companies"),
			"fields_label"                : _("Fields"),
			"headline"                    : _("Settler buildings"),
			"mining_label"                : _("Mining"),
			"services_label"              : _("Services"),
			"butchery-1"                  : _("Butchery: Needs pigs or cattle. Produces food."),
			"cattlerun-1"                 : _("Cattle run: Raises cattle. Needs a farm."),
			"charcoal-burning-1"          : _("Charcoal burning: Burns a lot of boards to charcoal."),
			"iron-mine-1"                 : _("Mine: Gets ores from deposit."),
			"pigsty-1"                    : _("Pigsty: Raises pigs. Needs a farm."),
			"saltponds-1"                 : _("Salt ponds: Evaporates salt. Built on sea coast."),
			"smeltery-1"                  : _("Smeltery: Refines all kind of ores."),
			"tavern-1"                    : _("Tavern: Provides get-together."),
			"tobaccofield-1"              : _("Tobacco field: Produces tobacco. Needs a farm."),
			"tobacconist-1"               : _("Tobacconist: Produces tobaccos out of tobacco."),
			"toolmaker-1"                 : _("Toolmaker: Produces tools out of iron."),
			},
		"buildtab_no_settlement.xml" : {
			"headline"                    : _("Game start"),
			"howto_1_need_bo"             : _("You need to found a settlement before you can construct buildings!"),
			"howto_2_navigate_ship"       : _("Select your ship and approach the coast via right-click."),
			"howto_3_build_bo"            : _("Afterwards, press the large button in the ship overview tab."),
			},
		"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" : {
			"build"                       : _("Build menu"),
			"destroy_tool"                : _("Destroy"),
			"diplomacyButton"             : _("Diplomacy"),
			"gameMenuButton"              : _("Game menu"),
			"logbook"                     : _("Captain's log"),
			},
		"minimap.xml" : {
			"rotateLeft"                  : _("Rotate map counterclockwise"),
			"rotateRight"                 : _("Rotate map clockwise"),
			"speedDown"                   : _("Decrease game speed"),
			"speedUp"                     : _("Increase game speed"),
			"zoomIn"                      : _("Zoom in"),
			"zoomOut"                     : _("Zoom out"),
			},
		"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" : {
#.........这里部分代码省略.........
开发者ID:slbucur,项目名称:unknown-horizons,代码行数:103,代码来源:guitranslations.py

示例7: get_option_parser

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
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,代码行数:86,代码来源:run_uh.py

示例8: set_translations

# 需要导入模块: from horizons.constants import VERSION [as 别名]
# 或者: from horizons.constants.VERSION import string [as 别名]
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,代码行数:103,代码来源:guitranslations.py


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