mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 11:00:23 +00:00
fix: i18n导致无法启动 & 增加 --noautoopen 参数 (#39)
* optimize: 精简未用到的配置项并在特征提取初步引入mps * add cmd argument: --noautoopen * fix: i18n * fix * fix * add genlocale workflow * add unitest * fix * fix * fix
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import json
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
|
||||
# Define the standard file name
|
||||
@@ -21,10 +20,16 @@ for lang_file in languages:
|
||||
# Find the difference between the language file and the standard file
|
||||
diff = set(standard_data.keys()) - set(lang_data.keys())
|
||||
|
||||
miss = set(lang_data.keys()) - set(standard_data.keys())
|
||||
|
||||
# Add any missing keys to the language file
|
||||
for key in diff:
|
||||
lang_data[key] = key
|
||||
|
||||
# Del any extra keys to the language file
|
||||
for key in miss:
|
||||
del lang_data[key]
|
||||
|
||||
# Sort the keys of the language file to match the order of the standard file
|
||||
lang_data = OrderedDict(sorted(lang_data.items(), key=lambda x: list(standard_data.keys()).index(x[0])))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user