diff --git a/apps/app-frontend/src/components/ui/settings/AboutSettings.vue b/apps/app-frontend/src/components/ui/settings/AboutSettings.vue index 7abeb8a..e4c4daf 100644 --- a/apps/app-frontend/src/components/ui/settings/AboutSettings.vue +++ b/apps/app-frontend/src/components/ui/settings/AboutSettings.vue @@ -139,7 +139,7 @@ const messages = defineMessages({ }, copyright: { id: 'app.settings.about.copyright', - defaultMessage: 'Copyright © Starlight All Rights Reserved.', + defaultMessage: 'Copyright © Axolotl All Rights Reserved.', }, version: { id: 'app.settings.about.version', @@ -159,7 +159,7 @@ const messages = defineMessages({ }, attribution: { id: 'app.settings.about.attribution', - defaultMessage: 'Starlight Launcher is a modified version of the open-source Modrinth codebase.', + defaultMessage: 'Starlight Launcher is a modified version of the Axolotl Launcher, which is based on the open-source Modrinth codebase.', }, notAffiliated: { id: 'app.settings.about.not-affiliated', diff --git a/apps/app-frontend/src/locales/en-US/index.json b/apps/app-frontend/src/locales/en-US/index.json index 661cba7..6dce6b6 100644 --- a/apps/app-frontend/src/locales/en-US/index.json +++ b/apps/app-frontend/src/locales/en-US/index.json @@ -6654,7 +6654,7 @@ "message": "Help support continued development" }, "app.settings.about.attribution": { - "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." }, "app.settings.about.community-support": { "message": "Project & community" diff --git a/apps/app-frontend/src/locales/zh-CN/index.json b/apps/app-frontend/src/locales/zh-CN/index.json index 9938324..93d1519 100644 --- a/apps/app-frontend/src/locales/zh-CN/index.json +++ b/apps/app-frontend/src/locales/zh-CN/index.json @@ -6708,7 +6708,7 @@ "message": "支持项目持续开发" }, "app.settings.about.attribution": { - "message": "Starlight Launcher 是开源项目 Modrinth 代码库的修改版本。" + "message": "Starlight Launcher 是基于 Axolotl 启动器修改的版本,Axolotl 启动器基于开源项目 Modrinth 代码库。" }, "app.settings.about.community-support": { "message": "项目与社区" diff --git a/apps/app-frontend/src/locales/zh-TW/index.json b/apps/app-frontend/src/locales/zh-TW/index.json index 1c316de..7ede2f3 100644 --- a/apps/app-frontend/src/locales/zh-TW/index.json +++ b/apps/app-frontend/src/locales/zh-TW/index.json @@ -6423,7 +6423,7 @@ "message": "支持專案持續開發" }, "app.settings.about.attribution": { - "message": "Starlight Launcher 是開源專案 Modrinth 程式碼庫的修改版本。" + "message": "Starlight Launcher 是基於 Axolotl 啟動器修改的版本,Axolotl 啟動器基於開源專案 Modrinth 程式碼庫。" }, "app.settings.about.community-support": { "message": "專案與社群" diff --git a/apps/app-frontend/src/pages/Settings.vue b/apps/app-frontend/src/pages/Settings.vue index 8566f92..7d9e992 100644 --- a/apps/app-frontend/src/pages/Settings.vue +++ b/apps/app-frontend/src/pages/Settings.vue @@ -376,7 +376,7 @@ const pageTitle: MessageDescriptor = settingsPageTitle
diff --git a/tools/icon_work/fix_162.py b/tools/icon_work/fix_162.py new file mode 100644 index 0000000..c109a07 --- /dev/null +++ b/tools/icon_work/fix_162.py @@ -0,0 +1,10 @@ + +p = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\components\ui\settings\AboutSettings.vue" +t = open(p, encoding="utf-8").read() +old = "defaultMessage: 'Starlight Launcher is a modified version of the open-source Modrinth codebase.'," +new = "defaultMessage: 'Starlight Launcher is a modified version of the Axolotl Launcher, which is based on the open-source Modrinth codebase.'," +assert old in t, "找不到第162行原句" +t = t.replace(old, new, 1) +open(p, "w", encoding="utf-8", newline="\n").write(t) +print("done") +print("新句:", new) diff --git a/tools/icon_work/fix_copyright.py b/tools/icon_work/fix_copyright.py new file mode 100644 index 0000000..ee3828a --- /dev/null +++ b/tools/icon_work/fix_copyright.py @@ -0,0 +1,20 @@ + +f1 = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\components\ui\settings\AboutSettings.vue" +t1 = open(f1, encoding="utf-8").read() +old1 = "defaultMessage: 'Copyright © Starlight All Rights Reserved.'," +new1 = "defaultMessage: 'Copyright © Axolotl All Rights Reserved.'," +assert old1 in t1, "AboutSettings 找不到版权行" +t1 = t1.replace(old1, new1, 1) +open(f1, "w", encoding="utf-8", newline="\n").write(t1) + +f2 = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\pages\Settings.vue" +t2 = open(f2, encoding="utf-8").read() +old2 = "Powered by Starlight" +new2 = "Powered by Axolotl" +assert old2 in t2, "Settings 找不到 Powered by 行" +t2 = t2.replace(old2, new2, 1) +open(f2, "w", encoding="utf-8", newline="\n").write(t2) + +print("done") +print("AboutSettings:142 ->", new1) +print("Settings:379 ->", new2) diff --git a/tools/icon_work/fix_locales.py b/tools/icon_work/fix_locales.py new file mode 100644 index 0000000..4772585 --- /dev/null +++ b/tools/icon_work/fix_locales.py @@ -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}: 已改") diff --git a/tools/icon_work/scan_attr.py b/tools/icon_work/scan_attr.py new file mode 100644 index 0000000..553fc38 --- /dev/null +++ b/tools/icon_work/scan_attr.py @@ -0,0 +1,42 @@ + +import os, re + +ROOT = r"D:\Project\Starlight_Lancher" +DIRS = [ + "apps/app-frontend/src", + "packages/ui/src", + "packages/app-lib/src", + "apps/app/src", +] +KEYWORDS = re.compile( + r"Copyright|All Rights|Powered by|attribution|Attribution|" + r"modified version|based on|版权所有|版权归|署名|致谢|鸣谢|" + r"credit|Credit|acknowledg|Acknowledg", + re.I, +) + +hits = [] +for d in DIRS: + base = os.path.join(ROOT, d) + if not os.path.isdir(base): + continue + for dp, dn, fn in os.walk(base): + dn[:] = [x for x in dn if x not in ("node_modules", "dist", "target", ".git")] + for f in fn: + if not f.endswith((".ts", ".vue", ".rs", ".js", ".json")): + continue + p = os.path.join(dp, f) + if "locales" in p and not p.endswith("en-US/index.json") and not p.endswith("zh-CN/index.json"): + continue + try: + lines = open(p, encoding="utf-8").read().split("\n") + except Exception: + continue + for i, line in enumerate(lines, 1): + if "Starlight" in line and KEYWORDS.search(line): + hits.append((os.path.relpath(p, ROOT), i, line.strip())) + +print(f"含版权/归属性质且提到 Starlight 的行:{len(hits)}\n") +for h in hits: + print(f"{h[0]}:{h[1]}") + print(f" {h[2][:160]}") diff --git a/tools/icon_work/scan_locales.py b/tools/icon_work/scan_locales.py new file mode 100644 index 0000000..27dc59b --- /dev/null +++ b/tools/icon_work/scan_locales.py @@ -0,0 +1,24 @@ + +import os, glob + +ROOT = r"D:\Project\Starlight_Lancher" +LOCALES = os.path.join(ROOT, "apps", "app-frontend", "src", "locales") + +KEYS = [ + "app.settings.about.copyright", + "app.settings.about.attribution", +] + +for path in sorted(glob.glob(os.path.join(LOCALES, "*", "index.json"))): + lang = os.path.basename(os.path.dirname(path)) + try: + lines = open(path, encoding="utf-8").read().split("\n") + except Exception: + continue + for i, line in enumerate(lines): + for key in KEYS: + if f'"{key}"' in line: + # 取下一行的 message + msg = lines[i + 1].strip() if i + 1 < len(lines) else "" + print(f"{lang} | {key}") + print(f" {msg[:150]}") diff --git a/tools/icon_work/verify_copyright.py b/tools/icon_work/verify_copyright.py new file mode 100644 index 0000000..010a522 --- /dev/null +++ b/tools/icon_work/verify_copyright.py @@ -0,0 +1,7 @@ + +a = open(r"D:\Project\Starlight_Lancher\apps\app-frontend\src\components\ui\settings\AboutSettings.vue", encoding="utf-8").read() +b = open(r"D:\Project\Starlight_Lancher\apps\app-frontend\src\pages\Settings.vue", encoding="utf-8").read() +print("AboutSettings 含 Axolotl 版权:", "Copyright \u00a9 Axolotl All Rights Reserved." in a) +print("AboutSettings 还含 Starlight 版权:", "Copyright \u00a9 Starlight All Rights Reserved." in a) +print("Settings 含 Powered by Axolotl:", "Powered by Axolotl" in b) +print("Settings 还含 Powered by Starlight:", "Powered by Starlight" in b)