Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
feat: 🌐 Translation for CurseAPIkey massage box (#34)
Browse files Browse the repository at this point in the history
* Feat: 🌐 Add i18n support for curse api key message box

* Chore: Check Style

* Chore: Check Style

* Chore: Add comment

* Chore: Check Style

Signed-off-by: choulily2 <lilychou_signup0@outlook.com>

* Chore: check Style

Signed-off-by: choulily2 <lilychou_signup0@outlook.com>

Signed-off-by: choulily2 <lilychou_signup0@outlook.com>
  • Loading branch information
choulily2 committed Aug 21, 2022
1 parent 3e09719 commit bbd66bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lang/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ download.logging.downloadFail: |
download.logging.verifyFail: |
{0} mods verify failed, generally not manually download required:
{1}
config.apiKey.title: Configuration
config.apiKey.content: |
Please enter a Curseforge API key
If you don't have one, please get one or use someone's key
4 changes: 4 additions & 0 deletions lang/zh-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ download.logging.downloadFail: |
download.logging.verifyFail: |
{0} 个模组校验失败,一般无需手动下载:
{1}
config.apiKey.title: 配置
config.apiKey.content: |
请输入 Curseforge API key
如果你没有,请获取一个或使用他人的密钥
6 changes: 3 additions & 3 deletions utils/window/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def main(self):
# ask api key
if self.factory.config.get('curseForgeAPIKey') == '':
result = askstring(
'Configuration',
'请输入 CurseForge API Key',
self.factory.language.translate('config.apiKey.title'),
self.factory.language.translate('config.apiKey.content'),
show='*',
parent=self
)
if result is None:
self.quit()
return
else:
self.factory.requester.api_key = result
self.factory.config['curseForgeAPIKey'] = result
Expand Down

0 comments on commit bbd66bb

Please sign in to comment.