Skip to content

Commit

Permalink
译文同步工具添加token获取引导,格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulian233 committed Nov 9, 2024
1 parent 9b3f9ba commit 5ed27b8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion ftbq_color_check/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def check_directory(directory_path: str, verbose: bool) -> list[str]:
relative_file_path = os.path.relpath(file_path, start=directory_path)
errors.extend(check_json_file(file_path, relative_file_path, verbose))
if not found_json:
print(Fore.YELLOW + f"目录 '{directory_path}' 中没有找到任何 JSON 文件")
print(Fore.YELLOW + f"目录 '{directory_path}' 中没有找到任何 JSON 文件")
return errors


Expand All @@ -76,6 +76,10 @@ def save_errors_to_file(errors: list[str]) -> None:


def main() -> None:
print(
Fore.YELLOW
+ "FTB任务颜色字符合法检查 [版本 1.1 (2024)]\n作者:Wulian233(捂脸)\n"
)
path = input("请输入 JSON 文件或目录路径:").strip()
verbose = input("是否显示详细错误信息?(y/n): ").strip().lower() == "y"

Expand Down
2 changes: 1 addition & 1 deletion paratranz_sync/icon.py

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions paratranz_sync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

class ParatranzUploader:
CONFIG_FILE = "config.json"
DEFAULT_TOKEN = "your token"
DEFAULT_VERSION = "1.5.0"
DEFAULT_TOKEN = "在https://paratranz.cn/users/my 点击设置获取"
DEFAULT_VERSION = "1.6.0"

def __init__(self, root: Tk) -> None:
self.root = root
Expand All @@ -32,7 +32,7 @@ def __init__(self, root: Tk) -> None:
if len(self.token) != 32:
messagebox.showwarning(
"警告",
"当前未设置token,无法使用程序功能。请打开config.json输入您的token。",
"当前未设置token,无法使用。\n请在https://paratranz.cn/users/my 点击设置获取并在config.json输入",
)
os.startfile("config.json")

Expand Down Expand Up @@ -80,7 +80,7 @@ def create_widgets(self) -> None:
}
for label, (row, method) in entries.items():
Label(self.root, text=label, font=("黑体", 12)).grid(
row=row, column=0, padx=10, pady=10, sticky="w"
row=row, column=0, padx=30, pady=10, sticky="w"
)
method(row)

Expand Down Expand Up @@ -250,7 +250,7 @@ async def put_translation(self, proj_id, str_id, body):
self.root.update()

def update_info(self) -> None:
update_content = "1. 公开发布,代码整理。\n2. 删除更新检测。"
update_content = "1. 代码整理。\n2. 配置文件添加token获取引导。"
self.update_label.config(text=f"更新内容:\n{update_content}")


Expand Down
2 changes: 1 addition & 1 deletion paratranz_sync/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exe = EXE(
a.binaries,
a.datas,
[],
name='Paratranz Sync - 1.5.0',
name='Paratranz Sync - 1.6.0',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand Down

0 comments on commit 5ed27b8

Please sign in to comment.