[Update] Config Window: 再起動ボタンの表示言語。UI Languageが変更された場合は、変更先の言語で表示。
This commit is contained in:
@@ -360,7 +360,7 @@ def callbackSetUiLanguage(value):
|
|||||||
value = get_key_by_value(selectable_languages, value)
|
value = get_key_by_value(selectable_languages, value)
|
||||||
print("callbackSetUiLanguage__after_get_key_by_value", value)
|
print("callbackSetUiLanguage__after_get_key_by_value", value)
|
||||||
config.UI_LANGUAGE = value
|
config.UI_LANGUAGE = value
|
||||||
view.showRestartButton()
|
view.showRestartButton(locale=config.UI_LANGUAGE)
|
||||||
|
|
||||||
# Translation Tab
|
# Translation Tab
|
||||||
def callbackSetDeeplAuthkey(value):
|
def callbackSetDeeplAuthkey(value):
|
||||||
|
|||||||
4
view.py
4
view.py
@@ -1,3 +1,4 @@
|
|||||||
|
from typing import Union
|
||||||
from os import path as os_path
|
from os import path as os_path
|
||||||
from types import SimpleNamespace
|
from types import SimpleNamespace
|
||||||
from tkinter import font as tk_font
|
from tkinter import font as tk_font
|
||||||
@@ -718,7 +719,8 @@ class View():
|
|||||||
|
|
||||||
|
|
||||||
# Config Window
|
# 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()
|
vrct_gui.config_window.restart_button_container.grid()
|
||||||
def hideRestartButton(self):
|
def hideRestartButton(self):
|
||||||
vrct_gui.config_window.restart_button_container.grid_remove()
|
vrct_gui.config_window.restart_button_container.grid_remove()
|
||||||
|
|||||||
Reference in New Issue
Block a user