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
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:
24
tools/icon_work/scan_locales.py
Normal file
24
tools/icon_work/scan_locales.py
Normal file
@ -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]}")
|
||||
Reference in New Issue
Block a user