Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fixbug' into fixbug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hpero4 committed Oct 28, 2023
2 parents bcfd27f + 2fa2852 commit 03c86fc
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
9 changes: 5 additions & 4 deletions app/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class Config(QConfig):
teamGamesNumber = RangeConfigItem("Functions", "TeamGamesNumber", 1,
RangeValidator(1, 10))

gameInfoFilter = ConfigItem("Functions", "GameInfoFilter", False, BoolValidator())
gameInfoFilter = ConfigItem(
"Functions", "GameInfoFilter", False, BoolValidator())

showTierInGameInfo = ConfigItem("Functions", "ShowTierInGameInfo", False,
BoolValidator())
Expand All @@ -83,16 +84,16 @@ class Config(QConfig):
)

enableCheckUpdate = ConfigItem("General",
"EnableCheckUpdate", True,
BoolValidator())
"EnableCheckUpdate", True,
BoolValidator())

# enableCopyPlayersInfo = ConfigItem("Functions", "EnableCopyPlayersInfo",
# False, BoolValidator())


YEAR = 2023
AUTHOR = "Zaphkiel"
VERSION = "0.8.1"
VERSION = "0.9.0"
FEEDBACK_URL = "https://github.com/Zzaphkiel/Seraphine/issues"
GITHUB_URL = "https://github.com/Zzaphkiel/Seraphine"

Expand Down
68 changes: 34 additions & 34 deletions app/resource/i18n/Seraphine.zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../../view/main_window.py" line="267"/>
<location filename="../../view/main_window.py" line="274"/>
<source>Career</source>
<translation>生涯</translation>
</message>
Expand All @@ -578,17 +578,17 @@
<translation type="obsolete">查查你的👀</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="269"/>
<location filename="../../view/main_window.py" line="276"/>
<source>Game Information</source>
<translation>对局信息</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="416"/>
<location filename="../../view/main_window.py" line="423"/>
<source>Start LOL</source>
<translation>启动游戏</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="270"/>
<location filename="../../view/main_window.py" line="277"/>
<source>Settings</source>
<translation>设置</translation>
</message>
Expand All @@ -598,17 +598,17 @@
<translation>其他功能</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="510"/>
<location filename="../../view/main_window.py" line="517"/>
<source>LOL Client has been connected</source>
<translation>客户端已连接</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="498"/>
<location filename="../../view/main_window.py" line="505"/>
<source>Invalid path</source>
<translation>路径非法</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="498"/>
<location filename="../../view/main_window.py" line="505"/>
<source>Please set the correct directory of the LOL client in the setting page</source>
<translation>请在设置页面中设置正确的 LOL 客户端路径</translation>
</message>
Expand All @@ -618,7 +618,7 @@
<translation>启动页</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="487"/>
<location filename="../../view/main_window.py" line="494"/>
<source>Start LOL successfully</source>
<translation>启动客户端成功</translation>
</message>
Expand All @@ -633,87 +633,87 @@
<translation type="obsolete">未定级</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="809"/>
<location filename="../../view/main_window.py" line="816"/>
<source>Home</source>
<translation>游戏大厅</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="812"/>
<location filename="../../view/main_window.py" line="819"/>
<source>Selecting Champions</source>
<translation>英雄选择</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="820"/>
<location filename="../../view/main_window.py" line="827"/>
<source>Gaming</source>
<translation>游戏中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="826"/>
<location filename="../../view/main_window.py" line="833"/>
<source>Waiting for status</source>
<translation>等待游戏结果</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="828"/>
<location filename="../../view/main_window.py" line="835"/>
<source>End of game</source>
<translation>游戏结束</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="830"/>
<location filename="../../view/main_window.py" line="837"/>
<source>Lobby</source>
<translation>房间组队中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="834"/>
<location filename="../../view/main_window.py" line="841"/>
<source>Ready check</source>
<translation>匹配确认</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="837"/>
<location filename="../../view/main_window.py" line="844"/>
<source>Match making</source>
<translation>匹配中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="1184"/>
<location filename="../../view/main_window.py" line="1193"/>
<source>Exception occurred 😥</source>
<translation>程序出现异常 😥</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="1189"/>
<location filename="../../view/main_window.py" line="1198"/>
<source>Copy to clipboard</source>
<translation>确认并复制到剪贴板</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="1190"/>
<location filename="../../view/main_window.py" line="1199"/>
<source>Cancel</source>
<translation>取消</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="268"/>
<location filename="../../view/main_window.py" line="275"/>
<source>Search 👀</source>
<translation>战绩查询 👀</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="548"/>
<location filename="../../view/main_window.py" line="555"/>
<source>Exit</source>
<translation>直接退出</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="547"/>
<location filename="../../view/main_window.py" line="554"/>
<source>Minimize</source>
<translation>最小化到任务栏</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="271"/>
<location filename="../../view/main_window.py" line="278"/>
<source>Quit</source>
<translation>退出</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="540"/>
<location filename="../../view/main_window.py" line="547"/>
<source>Do you wish to exit?</source>
<translation>您第一次点击了关闭按钮</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="540"/>
<location filename="../../view/main_window.py" line="547"/>
<source>Choose action for close button (you can modify it at any time in the settings page)</source>
<translation>请选择点击关闭按钮的默认行为(您可以今后任意时间在设置界面修改它)</translation>
</message>
Expand All @@ -723,12 +723,12 @@
<translation type="obsolete">客户端请求超时</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="237"/>
<location filename="../../view/main_window.py" line="242"/>
<source>Check Update Failed</source>
<translation>检查更新失败</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="237"/>
<location filename="../../view/main_window.py" line="242"/>
<source>Failed to check for updates, possibly unable to connect to Github.</source>
<translation>请确保能连接至 GitHub</translation>
</message>
Expand All @@ -738,7 +738,7 @@
<translation type="obsolete">超时</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="218"/>
<location filename="../../view/main_window.py" line="222"/>
<source>Connect API</source>
<translation>请求 API</translation>
</message>
Expand All @@ -748,12 +748,12 @@
<translation>服务器返回了不正常内容,可能其正在维护中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="215"/>
<location filename="../../view/main_window.py" line="216"/>
<source>Exceeded maximum retry attempts.</source>
<translation>超出最大尝试次数</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="218"/>
<location filename="../../view/main_window.py" line="222"/>
<source>LCU request error</source>
<translation>客户端信息请求失败</translation>
</message>
Expand Down Expand Up @@ -1057,12 +1057,12 @@
<translation>生涯</translation>
</message>
<message>
<location filename="../../view/search_interface.py" line="1168"/>
<location filename="../../view/search_interface.py" line="1176"/>
<source>Summoner not found</source>
<translation>召唤师未找到</translation>
</message>
<message>
<location filename="../../view/search_interface.py" line="1168"/>
<location filename="../../view/search_interface.py" line="1176"/>
<source>Please check the summoner name and retry</source>
<translation>请检查召唤师名后重试</translation>
</message>
Expand Down Expand Up @@ -1102,12 +1102,12 @@
<translation>灵活排位</translation>
</message>
<message>
<location filename="../../view/search_interface.py" line="1179"/>
<location filename="../../view/search_interface.py" line="1187"/>
<source>Games not found</source>
<translation>对局未找到</translation>
</message>
<message>
<location filename="../../view/search_interface.py" line="1179"/>
<location filename="../../view/search_interface.py" line="1187"/>
<source>No matches were found for this summoner</source>
<translation>没有找到该玩家相关对局</translation>
</message>
Expand Down
7 changes: 6 additions & 1 deletion app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from ..common.config import cfg, VERSION
from ..components.update_message_box import UpdateMessageBox
from ..lol.entries import Summoner
from ..lol.exceptions import SummonerGamesNotFound, RetryMaximumAttempts
from ..lol.exceptions import SummonerGamesNotFound, RetryMaximumAttempts, SummonerNotFound, SummonerNotInGame
from ..lol.listener import (LolProcessExistenceListener, LolClientEventListener,
getLolProcessPid)
from ..lol.connector import connector
Expand Down Expand Up @@ -214,12 +214,16 @@ def __onShowLcuConnectError(self, api, obj):
"The server returned abnormal content, which may be under maintenance.")
elif type(obj) is RetryMaximumAttempts:
msg = self.tr("Exceeded maximum retry attempts.")
elif type(obj) in [SummonerNotFound, SummonerNotInGame]:
return
else:
msg = repr(obj)

InfoBar.error(
self.tr("LCU request error"),
self.tr(f"Connect API") + f" {api}: {msg}",
duration=5000,
orient=Qt.Vertical,
parent=self,
position=InfoBarPosition.BOTTOM_RIGHT
)
Expand All @@ -240,6 +244,7 @@ def __onCheckUpdateFailed(self):
self.tr(
"Failed to check for updates, possibly unable to connect to Github."),
duration=5000,
orient=Qt.Vertical,
parent=self,
position=InfoBarPosition.BOTTOM_RIGHT
)
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Seraphine 提供的战绩查询相关功能的数据均是由英雄联盟客户


## 帮助我们改进 Seraphine 😘
个人开发能力有限,在您的使用过程中,如果遇到程序的任何 BUG 或不符合预期的行为,欢迎提出 [issue](https://github.com/Zzaphkiel/Seraphine/issues)。发布 issue 时请务必带上**环境信息**(如 Python 版本等),最好能提供问题的**复现过程**;若程序报错请带上**错误信息**
在您的使用过程中,如果遇到程序的任何 BUG 或不符合预期的行为,欢迎提出 [issue](https://github.com/Zzaphkiel/Seraphine/issues)。发布 issue 时请务必带上**环境信息**(如 Python、Seraphine 版本等),以及问题的**复现过程**;若程序报错请带上**错误信息**

如果您有功能上的添加或修改建议,也非常欢迎提出 issue 进行讨论![PR](https://github.com/Zzaphkiel/Seraphine/pulls) 也大欢迎!

Expand All @@ -111,7 +111,7 @@ pip install pyinstaller


## 引用以及参考资料 👀
- GUI 基于 [PyQt5](https://www.riverbankcomputing.com/software/pyqt/) 以及 [zhiyiYo/PyQt-Fluent-Widget](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) 实现
- GUI 基于 [PyQt5](https://www.riverbankcomputing.com/software/pyqt/) 以及 [zhiyiYo/PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) 实现
- 部分与 LOL 客户端的通信使用 [Willump](https://github.com/elliejs/Willump) 实现
- LCU API 使用方法以及汇总详见官方文档
- https://riot-api-libraries.readthedocs.io/en/latest/lcu.html#lcu-explorer
Expand Down

0 comments on commit 03c86fc

Please sign in to comment.