diff --git a/app/resource/i18n/Seraphine.zh_CN.qm b/app/resource/i18n/Seraphine.zh_CN.qm index 940dbad..90fafbd 100644 Binary files a/app/resource/i18n/Seraphine.zh_CN.qm and b/app/resource/i18n/Seraphine.zh_CN.qm differ diff --git a/app/resource/i18n/Seraphine.zh_CN.ts b/app/resource/i18n/Seraphine.zh_CN.ts index a3f440a..721c4a2 100644 --- a/app/resource/i18n/Seraphine.zh_CN.ts +++ b/app/resource/i18n/Seraphine.zh_CN.ts @@ -85,12 +85,12 @@ 第一率: - + Games 对局 - + First Rate 第一率 @@ -98,22 +98,22 @@ AutoAcceptMatchingCard - + Delay seconds after match made: 在对局找到后接受对局前延迟的秒数: - + seconds - + Disabled 未启用 - + Enabled, delay: 已启用,延迟: @@ -121,22 +121,22 @@ AutoAcceptSwapingCard - + Enable auto accept cail swap request: 自动接受楼层交换请求: - + Enable auto accept champion trade request: 自动接受英雄交换请求: - + Enabled 已启用 - + Disabled 未启用 @@ -159,12 +159,12 @@ 已启用,自动禁用: - + Disabled 未启用 - + Enable: 启用自动 Ban: @@ -174,67 +174,67 @@ 若队友预选该英雄,则空 Ban: - + Ban after a delay of seconds: 在进入禁用阶段后 Ban 人的秒数: - + Default Configurations 默认设置 - + Default champions: 默认禁用英雄: - + Choose 选择 - + Rank Configurations 按照位置设置 - + Top: 上路: - + Juggle: 打野: - + Mid: 中路: - + Bottom: 下路: - + Support: 辅助: - + Prevent banning champions picked by teammates: 若队友预选该英雄,则空 Ban: - + Reset 恢复默认 - + Enabled 已启用 @@ -248,7 +248,7 @@ 若非排位模式或按位置设置英雄不可用,则将使用默认设置 - + Default settings must be set. If champions set by lane are not available, default settings will be used. @@ -270,7 +270,7 @@ If champions set by lane are not available, default settings will be used.已启用,自动选择: - + Disabled 未启用 @@ -280,7 +280,7 @@ If champions set by lane are not available, default settings will be used.将要自动亮起的英雄: - + Enable: 启用自动亮起: @@ -290,7 +290,7 @@ If champions set by lane are not available, default settings will be used.在时间结束后确定选择(更换亮起英雄后无效) - + Completed before timeout: 在时间结束时确定选择: @@ -310,57 +310,57 @@ If champions set by lane are not available, default settings will be used.将要自动亮起的英雄: - + Default Configurations 默认设置 - + Default champions: 默认亮起英雄: - + Choose 选择 - + Rank Configurations 按照位置设置 - + Top: 上路: - + Juggle: 打野: - + Mid: 中路: - + Bottom: 下路: - + Support: 辅助: - + Enabled 已启用 - + Reset 恢复默认 @@ -374,7 +374,7 @@ If champions set by lane are not available, default settings will be used. - + Default settings must be set. If champions set by lane are not available, default settings will be used. @@ -386,92 +386,92 @@ If champions set by lane are not available, default settings will be used. AuxiliaryInterface - + Auxiliary Functions 其他功能 - + Profile 个人主页 - + Online status 个人签名 - + Set your profile online status 修改你个人卡片的的签名 - + Profile background 个人主页背景 - + Set your profile background skin 修改你的个人主页背景皮肤图片 - + Profile tier 段位展示 - + Set your tier showed in your profile card 修改你个人卡片显示的段位 - + Online Availability 在线状态 - + Set your online Availability 修改你的在线状态 - + Remove challenge tokens 卸下勋章 - + Remove all challenge tokens from your profile 卸下你个人卡片中的所有勋章 - + Game 游戏 - + Create 5v5 practice lobby 创建 5v5 练习模式 - + Auto accept 自动接受对局 - + Spectate 观战 - + Spectate live game of summoner in the same environment 观战同大区玩家正在进行的游戏 - + Auto select champion 自动亮起英雄 @@ -481,42 +481,42 @@ If champions set by lane are not available, default settings will be used.在盲选开始时自动亮起英雄 - + Lock config 锁定游戏设置 - + Make your game config unchangeable 让你的游戏设置不会因为切换账号而改变 - + Accept match making automatically after the number of seconds you set 在你设置的秒数之后自动接受对局匹配 - + Only bots can be added to the lobby 只能添加人机玩家 - + Auto reconnect 自动重连 - + Automatically reconnect when disconnected 当你掉线退出游戏时自动重新连接 - + Fix client window 修复客户端窗口 - + Fix incorrect client window size caused by DirectX 9 (need UAC) 修复客户端错误的窗口大小(需要管理员权限) @@ -531,27 +531,27 @@ If champions set by lane are not available, default settings will be used.向玩家发送好友请求 - + Auto select champion when your selection begin 在你的选择开始时自动亮起英雄 - + Auto ban champion 自动禁用英雄 - + Auto ban champion when your ban section begin 在你的禁用环节开始时自动禁用英雄 - + Ban / Pick 英雄选择 - + Remove prestige crest 卸下头像框 @@ -562,32 +562,32 @@ If champions set by lane are not available, default settings will be used.卸下你的召唤师头像框(需要召唤师等级大于等于 525) - + Auto accept swaping 自动接受交换请求 - + Accept ceil or champion swaping requests during B/P 自动接受队友的交换楼层或英雄的请求 - + Client 客户端 - + Restart client 重启客户端 - + Restart the LOL client without re queuing 重启客户端而不需要重新排队 - + Remove prestige crest from your profile icon (need your summoner level >= 525) 卸下你的召唤师头像框(需要召唤师等级大于等于 525) @@ -743,12 +743,12 @@ If champions set by lane are not available, default settings will be used. ChampionPerksWidget - + Set Rune Page 设为当前符文页 - + : @@ -769,7 +769,7 @@ If champions set by lane are not available, default settings will be used.英雄技能 - + Games 局游戏 @@ -777,27 +777,27 @@ If champions set by lane are not available, default settings will be used. ChampionTitleBar - + Win Rate 胜率 - + Pick Rate 登场率 - + Ban Rate 禁用率 - + First Rate 第一率 - + Average Place 平均排名 @@ -828,22 +828,22 @@ If champions set by lane are not available, default settings will be used. ChangeClientMessageBox - + Reconnect 重新连接 - + Cancel 取消 - + Change client 更改连接的客户端 - + Please select the target LOL client: 请选择目标客户端: @@ -853,12 +853,12 @@ If champions set by lane are not available, default settings will be used.[当前] - + PID: 进程 ID: - + , @@ -868,7 +868,7 @@ If champions set by lane are not available, default settings will be used.服务器: - + (current) (当前连接) @@ -881,17 +881,17 @@ If champions set by lane are not available, default settings will be used. ChangeDpiMessageBox - + OK 确定 - + Window is too big! 窗口太大了! - + We will reset your window size, please restart Seraphine. 我们将会重新设置你的窗口大小,请重启 Seraphine @@ -899,7 +899,7 @@ If champions set by lane are not available, default settings will be used. CounterChampionWidget - + Games 局游戏 @@ -907,27 +907,27 @@ If champions set by lane are not available, default settings will be used. CreatePracticeLobbyCard - + Create 创建 - + Lobby's name: (cannot be empty) 房间名:(不可为空) - + Please input lobby's name 请输入房间名 - + Please input password 请输入房间密码 - + Password: (password will NOT be set if it's empty) 房间密码:(若留空则不设密码) @@ -935,7 +935,7 @@ If champions set by lane are not available, default settings will be used. DodgeCard - + Dodge 秒退 @@ -956,12 +956,12 @@ If champions set by lane are not available, default settings will be used. ExceptionMessageBox - + Copy to clipboard and exit 复制错误信息并退出 - + Exit 直接退出 @@ -969,7 +969,7 @@ If champions set by lane are not available, default settings will be used. FixClientDpiCard - + Fix 修复 @@ -987,32 +987,32 @@ If champions set by lane are not available, default settings will be used. FriendRequestCard - + Send 发送 - + Please input summoner's name 请输入召唤师名及编号 - + Summoner not found 召唤师未找到 - + Please check the summoner's name and retry 请检查召唤师名后重试 - + Send friend request successfully 发送好友请求成功 - + Summoners's name you want to send friend request to: 你想加好友的召唤师名: @@ -1035,52 +1035,52 @@ If champions set by lane are not available, default settings will be used.重开 - + 1st 第一名 - + 2nd 第二名 - + 3rd 第三名 - + 4th 第四名 - + 5th 第五名 - + 6th 第六名 - + 7th 第七名 - + 8th 第八名 - + Get game infomation failed 获取对局详细信息失败 - + The server returned abnormal content. 服务器返回了不正常的内容 @@ -1144,42 +1144,42 @@ If champions set by lane are not available, default settings will be used. GameTitleBar - + Copy game ID 复制游戏 ID - + Game ID: 游戏 ID: - + Remake 重开 - + Win 胜利 - + Lose 失败 - + 1st 第一名 - + 2nd 第二名 - + 3rd 第三名 @@ -1189,27 +1189,27 @@ If champions set by lane are not available, default settings will be used.第四名 - + 4rd 第四名 - + 5rd 第五名 - + 6rd 第六名 - + 7rd 第七名 - + 8th 第八名 @@ -1253,7 +1253,7 @@ If champions set by lane are not available, default settings will be used. ItemsWidget - + Games 局游戏 @@ -1307,12 +1307,12 @@ If champions set by lane are not available, default settings will be used. LockConfigCard - + Error 错误 - + Failed to set file permissions 设置文件读写属性失败 @@ -1423,7 +1423,7 @@ If champions set by lane are not available, default settings will be used.匹配中 - + Exception occurred 😥 程序出现异常 😥 @@ -1595,17 +1595,17 @@ If champions set by lane are not available, default settings will be used. MultiChampionSelectMsgBox - + OK 确定 - + Cancel 取消 - + Choose Champions 选择英雄 @@ -1613,18 +1613,23 @@ If champions set by lane are not available, default settings will be used. MultiPathSettingMsgBox - + OK 确定 - + Cancel 取消 Set LOL cLient path + 设置客户端路径和顺序 + + + + Set LOL Client path 设置客户端路径和顺序 @@ -1699,12 +1704,12 @@ If champions set by lane are not available, default settings will be used. NoticeMessageBox - + Ok 知道了 - + Notice 公告 @@ -1712,32 +1717,32 @@ If champions set by lane are not available, default settings will be used. OnlineAvailabilityCard - + Apply 应用 - + chat 在线 - + away 离开 - + offline 离线 - + Availability 在线状态 - + Your online availability will be shown: 你将要被展示的在线状态: @@ -1745,17 +1750,17 @@ If champions set by lane are not available, default settings will be used. OnlineStatusCard - + Please input your status 请输入你的签名 - + Apply 应用 - + Online status you want to change to: 你想要改成的在线状态(签名): @@ -2050,7 +2055,7 @@ If champions set by lane are not available, default settings will be used. PerksSummaryWidget - + Games 局游戏 @@ -2094,7 +2099,7 @@ If champions set by lane are not available, default settings will be used. ProfileBackgroundCard - + Apply 应用 @@ -2126,163 +2131,173 @@ If champions set by lane are not available, default settings will be used. Please select skin - 请选择皮肤 + 请选择皮肤 - + Champion's name: 英雄: - + Select champion 选择英雄 - + Skin's name: 皮肤: - + This skin has a Signed Version 请选择皮肤版本 - + Setting to the signed version will restart the client. 设置 “签名版本” 需要重启客户端,客户端将会自动重启 - + Signed Version 签名版本 - + Unsigned Version 未签名版本 + + + Select Skin + 选择皮肤 + + + + Successfully + 成功 + ProfileTierCard - + Apply 应用 - + Teamfight Tactics 云顶之弈 - + Ranked solo 单 / 双排 - + Ranked flex 灵活排位 - + Na 未定级 - + Iron 坚韧黑铁 - + Bronze 英勇黄铜 - + Silver 不屈白银 - + Gold 荣耀黄金 - + Platinum 华贵铂金 - + Emerald 流光翡翠 - + Diamond 璀璨钻石 - + Master 超凡大师 - + Grandmaster 傲世宗师 - + Challenger 最强王者 - + Game mode 游戏模式 - + Tier 段位 - + Division 等级 - + Game mode: 游戏模式: - + Tier: 段位: - + Division: 等级: - + Please select game mode 请选择游戏模式 - + Please select Tier 请选择段位 - + Please select Division 请选择等级 @@ -2313,7 +2328,7 @@ If champions set by lane are not available, default settings will be used. RemovePrestigeCrestCard - + Remove 卸下 @@ -2321,7 +2336,7 @@ If champions set by lane are not available, default settings will be used. RemoveTokensCard - + Remove 卸下 @@ -2329,7 +2344,7 @@ If champions set by lane are not available, default settings will be used. RestartClientCard - + Restart 重启 @@ -2355,12 +2370,12 @@ If champions set by lane are not available, default settings will be used. SearchInterface - + Career 生涯 - + Summoner not found 召唤师未找到 @@ -2370,32 +2385,32 @@ If champions set by lane are not available, default settings will be used.请检查召唤师名后重试 - + Please input summoner name 请输入同大区召唤师名及编号 - + All 全部 - + Normal 匹配模式 - + A.R.A.M. 极地大乱斗 - + Ranked Solo 单 / 双排 - + Ranked Flex 灵活排位 @@ -2410,7 +2425,7 @@ If champions set by lane are not available, default settings will be used.没有找到该玩家相关对局 - + Please check the summoner's name and retry 请检查召唤师名后重试 @@ -2794,50 +2809,65 @@ when they are used by Seraphine, which will cost more time SpectateCard - + Spectate 观战 - + Summoner not found 召唤师未找到 - + Please check the summoner's name and retry 请检查召唤师名后重试 - + Summoner isn't in game 召唤师不在游戏中 - + Spectate successfully 观战拉起成功 - + Please wait 请等待游戏观战启动 Summoners's name you want to spectate: - 你想观战的同大区召唤师名及编号: + 你想观战的同大区召唤师名及编号: - + Please input summoner's name 请输入召唤师名 + + + Summoner's name you want to spectate: + 你想观战的同大区召唤师名及编号: + + + + Method: + 观战拉起方式: + + + + CMD + 命令行 + Spell - + Games 局游戏 @@ -2847,25 +2877,38 @@ when they are used by Seraphine, which will cost more time 召唤师技能 + + SplashesMessageBox + + + Save + 保存 + + + + Choose Path + 选择路径 + + StartInterface - + Start LOL Client 启动客户端 - + Invalid path 路径非法 - + Please set the correct directory of the LOL client in the setting page 请在设置页面中设置正确的 LOL 客户端路径 - + Start LOL successfully 启动客户端成功 @@ -2900,12 +2943,12 @@ when they are used by Seraphine, which will cost more time 更改连接的客户端 - + Can't change LOL Client 无法更改连接的客户端 - + Only one client is running 仅有一个客户端正在运行 @@ -2918,7 +2961,7 @@ when they are used by Seraphine, which will cost more time SummonerInfoBar - + Unranked 未定级 @@ -2960,17 +3003,17 @@ when they are used by Seraphine, which will cost more time SynergyItemWidget - + Average Place 平均排名 - + First Rate 第一率 - + Games 局游戏 @@ -2978,52 +3021,52 @@ when they are used by Seraphine, which will cost more time TeamView - + Winner 胜方 - + Loser 败方 - + Tower destroyed 摧毁防御塔 - + Inhibitor destroyed 摧毁召唤水晶 - + Baron Nashor killed 击杀男爵 - + Dragon killed 击杀巨龙 - + Rift Herald killed 击杀峡谷先锋 - + Minions killed 小兵及野怪击杀 - + Gold earned 获取金钱 - + Damage dealed to champions 对英雄造成伤害 @@ -3097,7 +3140,7 @@ when they are used by Seraphine, which will cost more time UpdateMessageBox - + Update detected 发现新版本 @@ -3107,12 +3150,12 @@ when they are used by Seraphine, which will cost more time 不再提醒 - + current: v 当前版本:v - + new: v 新版本:v @@ -3122,12 +3165,12 @@ when they are used by Seraphine, which will cost more time 立即下载 🤩 - + Ok 知道了 - + , @@ -3142,22 +3185,22 @@ when they are used by Seraphine, which will cost more time 取消 - + Update and Restart 自动下载安装(可能被拦截) - + Updating is only available on releases version 一键更新功能仅在发布版本可用 - + Downloading finished, decompressing... 下载成功,正在解压缩... - + Manually Download 转到浏览器手动下载 🤩 @@ -3165,17 +3208,17 @@ when they are used by Seraphine, which will cost more time WaitingForLolMessageBox - + Connect To Client 连接客户端 - + Exit Seraphine 退出 - + Tasklist is not available 我们无法自动连接至 LOL 客户端 😱 @@ -3192,7 +3235,7 @@ when they are used by Seraphine, which will cost more time 请在英雄联盟客户端完全启动后,点击 “连接客户端” 按钮 - + Please clicked "Connect To Client" button manually when LOL launched completely 请在英雄联盟客户端完全启动后,点击 “连接客户端” 按钮 diff --git a/app/view/auxiliary_interface.py b/app/view/auxiliary_interface.py index 520df2c..376f16f 100644 --- a/app/view/auxiliary_interface.py +++ b/app/view/auxiliary_interface.py @@ -322,7 +322,8 @@ def __onSkinButtonClicked(self): w = SplashesMessageBox(self.skins, self.window()) if w.exec(): self.chosenSkinId = self.skins[w.pager.currentIndex()][1]["skinId"] - self.skinLabel.setText(self.tr("Skin's name: ") + self.skins[w.pager.currentIndex()][0]) + self.skinLabel.setText( + self.tr("Skin's name: ") + self.skins[w.pager.currentIndex()][0]) async def initChampionList(self, champions: dict = None): if champions: @@ -338,7 +339,8 @@ async def initChampionList(self, champions: dict = None): def __onChampionSelected(self, championId): self.w.fadeOut() - self.championLabel.setText(self.tr("Champion's name: ") + connector.manager.getChampionNameById(championId)) + self.championLabel.setText(self.tr( + "Champion's name: ") + connector.manager.getChampionNameById(championId)) self.skinLabel.setText(self.tr("Skin's name: ")) self.chosenSkinId = None @@ -823,12 +825,15 @@ def __init__(self, title, content=None, parent=None): super().__init__(Icon.EYES, title, content, parent) self.inputWidget = QWidget(self.view) - self.inputLayout = QHBoxLayout(self.inputWidget) + self.inputLayout = QGridLayout(self.inputWidget) self.summonerNameLabel = QLabel( - self.tr("Summoners's name you want to spectate:")) + self.tr("Summoner's name you want to spectate:")) self.lineEdit = LineEdit() + self.spectateTypeLabel = QLabel(self.tr("Method:")) + self.spectateTypeComboBox = ComboBox() + self.buttonWidget = QWidget(self.view) self.buttonLayout = QHBoxLayout(self.buttonWidget) self.button = PushButton(self.tr("Spectate")) @@ -837,13 +842,19 @@ def __init__(self, title, content=None, parent=None): self.__initWidget() def __initLayout(self): - self.inputLayout.setSpacing(19) + self.inputLayout.setVerticalSpacing(19) self.inputLayout.setAlignment(Qt.AlignTop) self.inputLayout.setContentsMargins(48, 18, 44, 18) self.inputLayout.addWidget( - self.summonerNameLabel, alignment=Qt.AlignLeft) - self.inputLayout.addWidget(self.lineEdit, alignment=Qt.AlignRight) + self.summonerNameLabel, 0, 0, alignment=Qt.AlignLeft) + self.inputLayout.addWidget( + self.lineEdit, 0, 1, alignment=Qt.AlignRight) + self.inputLayout.addWidget( + self.spectateTypeLabel, 1, 0, alignment=Qt.AlignLeft) + self.inputLayout.addWidget( + self.spectateTypeComboBox, 1, 1, alignment=Qt.AlignRight) + self.inputLayout.setSizeConstraint(QHBoxLayout.SetMinimumSize) self.buttonLayout.setContentsMargins(48, 18, 44, 18) @@ -864,6 +875,10 @@ def __initWidget(self): self.button.setMinimumWidth(100) self.button.setEnabled(False) + self.spectateTypeComboBox.addItem("LCU API", userData="LCU") + self.spectateTypeComboBox.addItem(self.tr("CMD"), userData="CMD") + self.spectateTypeComboBox.setMinimumWidth(100) + self.lineEdit.textChanged.connect(self.__onLineEditTextChanged) self.button.clicked.connect(self.__onButtonClicked) @@ -884,11 +899,14 @@ def info(type, title, content): text = self.lineEdit.text() text = text.replace('\u2066', '').replace('\u2069', '') - res = await connector.spectateDirectly(text) - pwd = os.getcwd() - os.chdir(f"{cfg.get(cfg.lolFolder)[0]}/../Game") - subprocess.Popen(['League of Legends.exe', f'{res}']) - os.chdir(pwd) + if self.spectateTypeComboBox.currentData() == 'LCU': + await connector.spectate(text) + else: + res = await connector.spectateDirectly(text) + pwd = os.getcwd() + os.chdir(f"{cfg.get(cfg.lolFolder)[0]}/../Game") + subprocess.Popen(['League of Legends.exe', f'{res}']) + os.chdir(pwd) except SummonerNotFound: info('error', self.tr("Summoner not found"),