Skip to content

Commit

Permalink
Merge pull request #697 from yobson1/main-beta
Browse files Browse the repository at this point in the history
Update translations
  • Loading branch information
Night-stars-1 authored Aug 1, 2023
2 parents 77fb1d7 + 985e828 commit 8a2cf48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
11 changes: 6 additions & 5 deletions Honkai_Star_Rail.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def select_map(main_map):
if not options_map:
return None, _("你没下载地图,拿什么选?")
keys = list(options_map.keys())
values = list(options_map.values())+[_("返回上一级")]
values = [_(split_name[0]) + '-' + split_name[1] for split_name in (map_name.split('-') for map_name in options_map.values())]
values.append(_("返回上一级"))
option_ = questionary.select(title_, values).ask()
if option_ == _("返回上一级"):
return select_word()
Expand Down Expand Up @@ -172,17 +173,17 @@ def select_map(main_map):
def set_config(self, start = True):
global game_title
if not sra_config_obj.start or not start:
title = "请选择你游戏的运行语言:"
import utils.config
_ = utils.config._
title = _("请选择你游戏的运行语言:")
options = {
"简体中文": "zh_CN",
"繁體中文": "zh_TC",
"English": "EN"
}
option = questionary.select(title, options).ask()
sra_config_obj.language = options[option]
import utils.config
importlib.reload(utils.config)
_ = utils.config._
title = _("请选择代理地址:(不使用代理选空白选项)")
options = ['https://ghproxy.com/', 'https://ghproxy.net/', 'hub.fgit.ml', '']
url_ms = []
Expand Down Expand Up @@ -261,7 +262,7 @@ def is_updata(self):
if not asyncio.run(update_file().is_latest(type=up_data['type'], version=up_data['version'], is_log=False))[0]:
need_updata.append(name)
return need_updata

def main(self, option:str=_('大世界'),start: str=None,role_list: str=None):
"""
参数:
Expand Down
Binary file modified locale/EN/LC_MESSAGES/sra.mo
Binary file not shown.
8 changes: 5 additions & 3 deletions utils/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class Map:
def __init__(self,title = _("崩坏:星穹铁道")):
"""
参数:
参数:
:param platform: 运行设备
"""
if sra_config_obj.language != "EN":
Expand Down Expand Up @@ -42,7 +42,7 @@ def on_press(key):
with keyboard.Listener(on_press=on_press) as listener: # 创建按键监听线程
listener.join() # 等待按键监听线程结束


def map_init(self):
# 进行地图初始化,把地图缩小,需要缩小5次
target = cv.imread(f'./picture/pc/contraction.jpg')
Expand Down Expand Up @@ -125,7 +125,7 @@ def start_map(self:Map, start, check:bool=False):
wrong_map = True
if f'map_{start}.json' in self.map_list:
if not check:
map_list = self.map_list[self.map_list.index(f'map_{start}.json'):len(self.map_list)]
map_list = self.map_list[self.map_list.index(f'map_{start}.json'):len(self.map_list)]
else:
log.info("开始捡漏")
map_list = sra_config_obj.fight_data.get("data", [])
Expand All @@ -137,6 +137,8 @@ def start_map(self:Map, start, check:bool=False):
planet_number=map.split("-")[0]
map_data = read_json_file(f"map/{map}.json")
name:str = map_data['name']
split_name = name.split('-')
name = _(split_name[0]) + '-' + split_name[1]
author = map_data['author']
start_dict = map_data['start']
webhook_and_log(_("开始\033[0;34;40m{name}\033[0m锄地").format(name=name))
Expand Down

0 comments on commit 8a2cf48

Please sign in to comment.