mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
fix
This commit is contained in:
@@ -29,14 +29,11 @@ def dump_english_config(components):
|
||||
all_texts = []
|
||||
for c in components:
|
||||
label = getattr(c, 'label', None)
|
||||
value = getattr(c, 'value', None)
|
||||
choices = getattr(c, 'choices', None)
|
||||
info = getattr(c, 'info', None)
|
||||
|
||||
if isinstance(label, str):
|
||||
all_texts.append(label)
|
||||
if isinstance(value, str):
|
||||
all_texts.append(value)
|
||||
if isinstance(info, str):
|
||||
all_texts.append(info)
|
||||
if isinstance(choices, list):
|
||||
@@ -48,7 +45,7 @@ def dump_english_config(components):
|
||||
if isinstance(y, str):
|
||||
all_texts.append(y)
|
||||
|
||||
config_dict = {k: k for k in all_texts}
|
||||
config_dict = {k: k for k in all_texts if k != ""}
|
||||
full_name = os.path.abspath(os.path.join(localization_root, 'en.json'))
|
||||
|
||||
with open(full_name, "w", encoding="utf-8") as json_file:
|
||||
|
||||
Reference in New Issue
Block a user