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

View File

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