Skip to content

Commit

Permalink
添加翻译链接
Browse files Browse the repository at this point in the history
  • Loading branch information
DancingSnow0517 committed May 25, 2023
1 parent c2834af commit 233eeae
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 31 deletions.
75 changes: 45 additions & 30 deletions src/resources/i18n/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,147 +254,147 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="76"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="84"/>
<source>Show Departure Warp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="84"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="92"/>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="85"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="93"/>
<source>Log Level</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="85"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="93"/>
<source>Set the log level of the software. The higher the level, the more logs will be output, which will take effect after restarting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="94"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="102"/>
<source>Software updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="95"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="103"/>
<source>Check for updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="95"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="103"/>
<source>Check for updates to StarRail Gacha Exporter.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="95"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="103"/>
<source>Current version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="103"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="111"/>
<source>Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="103"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="111"/>
<source>When opening, The software will use a proxy address to download new versions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="110"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="118"/>
<source>GitHub Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="110"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="118"/>
<source>Set GitHub proxy address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="118"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="126"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="119"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<source>GitHub repository</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="119"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<source>Open the GitHub repository</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="119"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<source>This project is already open source using the MIT license on Github!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<source>Feedback issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<source>Open GitHub Issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="127"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<source>If you encounter any problems during use, please feel free to provide feedback on GitHub Issues!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="143"/>
<source>QQ Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="143"/>
<source>Join QQ group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="135"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="143"/>
<source>Welcome to join the QQ group and discuss for improvement in this project together!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="144"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="152"/>
<source>Save Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="144"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="152"/>
<source>Save the current settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="201"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="210"/>
<source>Choose a game path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="237"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="246"/>
<source>Configuration file saved successfully!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="245"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="254"/>
<source>Check update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="242"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="251"/>
<source>It is currently the latest version!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="245"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="254"/>
<source>Discovering a new version: %s
Do you want to download and install now?</source>
<translation type="unfinished"></translation>
Expand All @@ -405,10 +405,25 @@ Do you want to download and install now?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="76"/>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="84"/>
<source>When opening,Departure warp will be displayed in the Home Page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="76"/>
<source>Open Crowdin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="76"/>
<source>Help us translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../star_rail_gacha/app/pages/settings_page.py" line="76"/>
<source>Don&apos;t see your language or the quality is poor? Help us translate!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TableFrame</name>
Expand Down
5 changes: 4 additions & 1 deletion src/star_rail_gacha/app/components/language_setting_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ def __init__(self, value: str, icon: Union[str, QIcon, FluentIconBase], title, c
self.hBoxLayout.addSpacing(16)

language_list = os.listdir("resources/i18n")
language_list.append("en-US")
language_list = ["en-US"] + language_list
item_list = []
for language in language_list:
if language == "en-US":
item_list.append(f"{language_map[language]} ({language})")
continue
if os.path.isdir(f"resources/i18n/{language}"):
item_list.append(f"{language_map[language]} ({language})" if language in language_map else language)

Expand Down
9 changes: 9 additions & 0 deletions src/star_rail_gacha/app/pages/settings_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def __init__(self, parent=None) -> None:
self.tr("Select the software display language, which will take effect after restarting."),
parent=self.personalGroup
)
self.translateLinkCard = HyperlinkCard(
"https://crowdin.com/project/starrail-gacha",
self.tr("Open Crowdin"),
FluentIcon.LANGUAGE,
self.tr("Help us translate"),
self.tr("Don't see your language or the quality is poor? Help us translate!"),
parent = self.personalGroup
)
self.showDepartureCard = SwitchSettingCard(
FluentIcon.TAG,
self.tr("Show Departure Warp"),
Expand Down Expand Up @@ -176,6 +184,7 @@ def __initLayout(self):
self.personalGroup.addSettingCard(self.themeCard)
self.personalGroup.addSettingCard(self.themeColorCard)
self.personalGroup.addSettingCard(self.languageCard)
self.personalGroup.addSettingCard(self.translateLinkCard)
self.personalGroup.addSettingCard(self.showDepartureCard)

self.otherGroup.addSettingCard(self.logLevelCard)
Expand Down

0 comments on commit 233eeae

Please sign in to comment.