From 6ed59df59634373ab691aeb204a6c4b5cef699b8 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sat, 14 Oct 2023 17:48:15 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20Config=20Window:=20=E5=86=8D?= =?UTF-8?q?=E8=B5=B7=E5=8B=95=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E8=A8=80=E8=AA=9E=E3=80=82UI=20Language=E3=81=8C?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=95=E3=82=8C=E3=81=9F=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=AF=E3=80=81=E5=A4=89=E6=9B=B4=E5=85=88=E3=81=AE=E8=A8=80?= =?UTF-8?q?=E8=AA=9E=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller.py | 2 +- view.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/controller.py b/controller.py index d6205f82..bf8ee183 100644 --- a/controller.py +++ b/controller.py @@ -360,7 +360,7 @@ def callbackSetUiLanguage(value): value = get_key_by_value(selectable_languages, value) print("callbackSetUiLanguage__after_get_key_by_value", value) config.UI_LANGUAGE = value - view.showRestartButton() + view.showRestartButton(locale=config.UI_LANGUAGE) # Translation Tab def callbackSetDeeplAuthkey(value): diff --git a/view.py b/view.py index f84e955d..541c6b72 100644 --- a/view.py +++ b/view.py @@ -1,3 +1,4 @@ +from typing import Union from os import path as os_path from types import SimpleNamespace from tkinter import font as tk_font @@ -718,7 +719,8 @@ class View(): # Config Window - def showRestartButton(self): + def showRestartButton(self, locale:Union[None,str]=None): + self.view_variable.VAR_CONFIG_WINDOW_RESTART_BUTTON_LABEL.set(i18n.t("config_window.restart_message", locale=locale)) vrct_gui.config_window.restart_button_container.grid() def hideRestartButton(self): vrct_gui.config_window.restart_button_container.grid_remove()