Update localization.py

This commit is contained in:
liubo0902 2023-09-11 09:22:27 +08:00 committed by GitHub
parent ff7027ffc0
commit 413123f08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -14,12 +14,10 @@ def list_localizations(dirname):
if ext.lower() != ".json": if ext.lower() != ".json":
continue continue
fn = fn.replace(" ", "").replace("(", "_").replace(")","")
localizations[fn] = [os.path.join(dirname, file)] localizations[fn] = [os.path.join(dirname, file)]
for file in scripts.list_scripts("localizations", ".json"): for file in scripts.list_scripts("localizations", ".json"):
fn, ext = os.path.splitext(file.filename) fn, ext = os.path.splitext(file.filename)
fn = fn.replace(" ", "").replace("(", "_").replace(")","")
if fn not in localizations: if fn not in localizations:
localizations[fn] = [] localizations[fn] = []
localizations[fn].append(file.path) localizations[fn].append(file.path)