Skip to content

Commit

Permalink
Fix i18n initialization bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Jan 6, 2025
1 parent 5977637 commit 6c17f42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, args):
self.deepl_api = DeepLAPI(
output_dir=os.path.join(self.args.output_dir, "translations")
)
self.i18n = load_yaml(I18N_YAML_PATH)
self.default_params = load_yaml(DEFAULT_PARAMETERS_CONFIG_PATH)
print(f"Use \"{self.args.whisper_type}\" implementation\n"
f"Device \"{self.whisper_inf.device}\" is detected")
Expand Down Expand Up @@ -96,12 +97,11 @@ def launch(self):
uvr_params = self.default_params["bgm_separation"]

with self.app:
lang = gr.Radio(choices=[("English", "en"), ("简体中文", "zh"), ("繁體中文", "zh-Hant"), ("日本語", "ja"),
("한국인", "ko"), ("español", "es"), ("française", "fr"), ("Deutsch", "de"), ],
lang = gr.Radio(choices=list(self.i18n.keys()),
label=_("Language"), interactive=True,
visible=False, # Set it by development purpose.
)
with Translate(I18N_YAML_PATH, lang):
with Translate(I18N_YAML_PATH):
with gr.Row():
with gr.Column():
gr.Markdown(MARKDOWN, elem_id="md_project")
Expand Down

0 comments on commit 6c17f42

Please sign in to comment.