From 3855834f93cb4437e55352a5f22bd374352f2a99 Mon Sep 17 00:00:00 2001 From: Brad Date: Thu, 27 Jul 2023 15:18:11 +0100 Subject: [PATCH 1/5] Update English locale --- locale/EN/LC_MESSAGES/sra.mo | Bin 12917 -> 14020 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/locale/EN/LC_MESSAGES/sra.mo b/locale/EN/LC_MESSAGES/sra.mo index cf0612f9b6ba0373b83122bdaa896f4924e29eca..6f89d616ed947766ce1ab6e3858cc8dbb32034ef 100644 GIT binary patch delta 4461 zcmYk<3s6+o8Nl&_&k#`&6cxeTXcQk91&ttDd_goShG>jNQ*~WdTwHc>A0kcTiqD8I zlIt4YUrzse=EhzcjB;Vpa~AK)_V)kmpfEWr%?OxqC ztiVB}4|P&Mzog68@CEAcX@A7Ql#`Q`8i$imR;&cO(ZAY4MjEV=3OuCCwc0Z%BM<2E z&nWM8?H@G`rQt-Jh+Q%pjbY-~GU;@g_ zh9Q$ub5P!2iPBCnvb|~@%KMdQ;C^H`)kT!{ZsREYd;se&4L;T{3>_G4Z~{t$lTjMV z$821J(!hJ#TJ0H>4g$J-2W5a?;2?aU>z_%E{=Of|`$Ljhe`#>MelSg2pk0bG!(x;} z>D2Yry8bxIKu>9#klj%Mly>jx`meMhUH=d{$Lf(^SM+9>(ohP@5)Mb1!9=b;S5 zs_RQo-rIz-Le(f8oW3f`@T+Vx3{K5PITS@GBin~E zfP>nTy8Z&n%r9#{(a-N|+fZisACz|ftL^k$bfscZ+D(bb{*TlZ6H$IR6W3yau5UqU z=(c|T7yOCxeY}Ww4W;-vs%;z)J{`(LE{-pF&5wm^zZrCmui<`FALLpUZy9idCW7K$*ZE zH1IUaz&=Hpz?UfPeS`A;cPQ8SG0JV}=jSfT(q*HJY%XS^6**t(Aj$wQp{&41C^Nf_ zGT=X9F8&>*gJd>dR^mmJmB>LEzzmdj3Qz{P7^OeIoy;UMmDmkiu{YjC>EJW%KT&@8 z1ImEAv60fjK$JuIJWBm6l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jul 2023 15:18:34 +0100 Subject: [PATCH 2/5] Translate map names --- Honkai_Star_Rail.py | 11 ++++++----- utils/map.py | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Honkai_Star_Rail.py b/Honkai_Star_Rail.py index d8e8c003..64278705 100644 --- a/Honkai_Star_Rail.py +++ b/Honkai_Star_Rail.py @@ -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() @@ -172,7 +173,9 @@ 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", @@ -180,9 +183,7 @@ def set_config(self, start = True): } 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 = [] @@ -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): """ 参数: diff --git a/utils/map.py b/utils/map.py index 05e8f736..5bc83db4 100644 --- a/utils/map.py +++ b/utils/map.py @@ -11,7 +11,7 @@ class Map: def __init__(self,title = _("崩坏:星穹铁道")): """ - 参数: + 参数: :param platform: 运行设备 """ if sra_config_obj.language != "EN": @@ -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') @@ -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", []) @@ -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)) From 9463e6c14762c32172b087f5280f30426b8185f6 Mon Sep 17 00:00:00 2001 From: Brad Date: Thu, 27 Jul 2023 15:38:01 +0100 Subject: [PATCH 3/5] Update English locale --- locale/EN/LC_MESSAGES/sra.mo | Bin 14020 -> 14029 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/locale/EN/LC_MESSAGES/sra.mo b/locale/EN/LC_MESSAGES/sra.mo index 6f89d616ed947766ce1ab6e3858cc8dbb32034ef..9665e639bbc488b5841b97d9a786b2453d13e648 100644 GIT binary patch delta 489 zcmXZXF)Tw-6vpvWimIZ~)bm2?8L*+PS5d13iCU3Z8hxQd+h|`U67gab5rf6hkr=w* zNjf$WTf<;7n#622_+RbxyXWTKbI$jYf6d=lea?u8Xfcrp&S4Zcum|%P!U~S!8R~e8 zeb~TmY~l{S;~LJ!TmO%+pZXMic!^VZjRV+-iz8_cZ(OLxV+oOAOyUftaRHBU6Q6J$ z1M?!xl5JE0&QS%pY5R-@^(SiRF1NVl`^h85zVb7^v*x;Peh*p delta 480 zcmXZYKS%;m9Ki8kX=(QF=&(ydyM}Zs@YEuQT51TA+FF7TjJQZI?2NXHh}H(jq@k$@ zB)AY-rG|!RY-(?=rLpfzr_cNSc<=Y;y_KKK4~?)lDk4T&B#tRe;3|f&ggPGJB%Wdn z8#st9?8i24<14OV((1fF#9`tS4C4hR@e)U{Wr-&R4lg8BVLc-q4He^Cvh-!Y1xsP6sXe?y!m*65<{Td00|x$6c-h<8j5EG7FmfY;cEx2Os?{l&;vG?>lj sEPuxQ)pgM9f6T-Je;Cz4Z2$lO From 709853387209ddd0a7350bf56557ad0e91926862 Mon Sep 17 00:00:00 2001 From: Brad Date: Thu, 27 Jul 2023 15:56:00 +0100 Subject: [PATCH 4/5] Fix map name translations on Luofu --- locale/EN/LC_MESSAGES/sra.mo | Bin 14029 -> 14028 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/locale/EN/LC_MESSAGES/sra.mo b/locale/EN/LC_MESSAGES/sra.mo index 9665e639bbc488b5841b97d9a786b2453d13e648..58f5f134fec1ea9371a42b192cc1fb2a42a11386 100644 GIT binary patch delta 920 zcmXZaKWI}?6vy#PY^_OSV=U3uKkZW*2Qf`eO(h)!i6V*>tDp{Dp0w5{O;TTC5D^~5 zjzz={4uayM;vkV|g*sW(MO$c~lQ=0t9K=DV4)yzM-t;;5zI*RE=f1m``;x1KTfCSt zrZZv8ASSUDuVEO=*p7Fw6Ca?3uP}-=Y{DO?eRb6Of4B{Uy~gZC3%6nxx8ns&VZPUR zrkmgi6G42B&G;EN;4*H(6+D7JQ3>M7M#2oXFg}hU973IQ302@_RKgNwa0WNxCyd}? z(rYC6#)K06Mr~X}RUGYWBeI%rG>;~l64{n&-Ws7@zQH*gbo;tXp4b5ubKs1BEK1Xu7RrnqnIzl|zj z8aJVLpI{%sLu|tZ9KvPP!QK6hf0;pU-<-w6=;1|ti>EPi$QW{&5mWL>#E7B#6YBxppdQgUGHqPczk7;$logEOTs0H=6$_+O)wuOH96RQeoxELg3VADA z$mN`3k#M#r@vil#TXKqazIfG{tkx5Afnau`aAWjJ!5ytu`UaY#=S#LbZr>VntuuDn Lo^b5h)pYGYE&F@K delta 921 zcmYMyKWI}?6vy#vw2h|GT1%|Yzpp}c${($Xwu0avsG{lOP+J^)h}s8zsU$HF5g#2z zibFsg1Q(@)i}gu6bf|U^vHpQfMF$1Jq2QKDMEw4e2Tq@R?>qOLbMLz!ypP_Cc+~GQ z##kw1hA@emU%@y|VlURv!Wp!27JKj=Zon@X!*8hgHQbJWaX%)~#%#l5*oWuwFkVd? z-|S=XkcCY+j~)0L*W+8nt#6|4J z<&57h&|pD@exNosQ5|`806*q^Q@eS_5 z&prcf_!S034;izAc^@hui+gbdby5#?1GjJ&-b3wwhH7XDb;1?Aj14@88SY#AYp4dM zaU=Q<7#v{m2)E!87Vr})@$P~4zsw`IZwh!6@8BrD!V4HbVhpv+80rA`Q3rS$x{NmS z@2Fq0F4tiEfrFUGVN@e`LuW!CqfYi5_2^z=FD{@S>k8^*tC+x_sJK7aDoFBv z<`ydcICdMlKie7@a|!i`CXi)QMm?rk)T5k3C0+;yV{3`XKrTqy&3M Date: Thu, 27 Jul 2023 21:14:14 +0100 Subject: [PATCH 5/5] Update English locale Change Electrical Room to Electrical for improved OCR consistency --- locale/EN/LC_MESSAGES/sra.mo | Bin 14028 -> 14023 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/locale/EN/LC_MESSAGES/sra.mo b/locale/EN/LC_MESSAGES/sra.mo index 58f5f134fec1ea9371a42b192cc1fb2a42a11386..51a79fc095fdef17caa0a1080c615968e3c7a18b 100644 GIT binary patch delta 452 zcmXZZFGxdC6vy#j*mORfe|S9S6m^D)WrO{BJ~RpjaTd#p$to`y1QA{o5!+a>xh1ho zAI8C&3>HjAlfh=Q81#GarO&yCbMHBaI|^UIUMmwhlAMaPfF3Sm8CS4@<9LEDp5hW- zVjjCViG3WyAs*o??qR9=fBy`#oFmNO4X$Imsz}oWeG&&aLVI|zCe33V%eapLo?{cA zuz^lpqL-Rz3tXWs&`BI%f%7}&@E2{6oG-0n(T}7}f?X0e$VK9H;w{={_n5*Sy7-J! zI7EB!4d?I!t?nDG;Sa8%OB1X2aRzr14>t(x3yzVc6ygNlVHzLM!^e2b`Seo3b}fjD Lg|FE-Uy0Lye3Uld delta 458 zcmXZYze@sf7{~EvxJ$h<6SM4>UPB=cfoE6fKM;jMwYa!99g0&!a0HGKA#M$A+7!Z3 zL8A~YA~ZBLw$#)g;L`iSn_kcJ@cs4qzI!8Y(2e>D5wVIQ8C=B;EMXQ;F@jA@;RUYY zHLlHbTM)3-5-9o)t{M|_#57&17<57dKmC6Og8;|`wSKKfY0 z7p!7pSA@HyjvC+wH9$Y~4Q={wTt>s4K4cwp^aa-!*`qjOpbxnUy$!ubP4