feat:一些版权描述的语言
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled

This commit is contained in:
2026-09-13 14:01:04 +08:00
parent 9565466571
commit 5b2cc3f94e
11 changed files with 141 additions and 6 deletions

View File

@ -0,0 +1,32 @@
import os, glob
ROOT = r"D:\Project\Starlight_Lancher"
LOCALES = os.path.join(ROOT, "apps", "app-frontend", "src", "locales")
REPLACEMENTS = {
"en-US": (
'"message": "Starlight Launcher is a modified version of the open-source Modrinth codebase."',
'"message": "Starlight Launcher is a modified version of the Axolotl Launcher, which is based on the open-source Modrinth codebase."',
),
"zh-CN": (
'"message": "Starlight Launcher 是开源项目 Modrinth 代码库的修改版本。"',
'"message": "Starlight Launcher 是基于 Axolotl 启动器修改的版本Axolotl 启动器基于开源项目 Modrinth 代码库。"',
),
"zh-TW": (
'"message": "Starlight Launcher 是開源專案 Modrinth 程式碼庫的修改版本。"',
'"message": "Starlight Launcher 是基於 Axolotl 啟動器修改的版本Axolotl 啟動器基於開源專案 Modrinth 程式碼庫。"',
),
}
for lang, (old, new) in REPLACEMENTS.items():
p = os.path.join(LOCALES, lang, "index.json")
t = open(p, encoding="utf-8").read()
if old not in t:
print(f"{lang}: 找不到原句,跳过")
continue
t = t.replace(old, new, 1)
open(p, "w", encoding="utf-8", newline="\n").write(t)
import json
json.load(open(p, encoding="utf-8")) # 校验合法
print(f"{lang}: 已改")