👍[Update] Main Init : configで保存する変数削除に伴い、初期化処理を追加

This commit is contained in:
misyaguziya
2023-09-25 05:40:28 +09:00
parent b259a2a3d8
commit 06ba68ecdd

16
main.py
View File

@@ -181,6 +181,20 @@ def messageBoxPressKeyAny(e):
model.oscStartSendTyping()
# func select languages
def initSetLanguageAndCountry():
select = config.SELECTED_TAB_YOUR_LANGUAGES[config.SELECTED_TAB_NO]
language, country = model.getLanguageAndCountry(select)
config.SOURCE_LANGUAGE = language
config.SOURCE_COUNTRY = country
select = config.SELECTED_TAB_TARGET_LANGUAGES[config.SELECTED_TAB_NO]
language, country = model.getLanguageAndCountry(select)
config.TARGET_LANGUAGE = language
config.TARGET_COUNTRY = country
config.CHOICE_TRANSLATOR = model.findTranslationEngine(config.SOURCE_LANGUAGE, config.TARGET_LANGUAGE)
model.authenticationTranslator(callbackSetAuthKeys)
def setYourLanguageAndCountry(select):
languages = config.SELECTED_TAB_YOUR_LANGUAGES
languages[config.SELECTED_TAB_NO] = select
@@ -566,6 +580,8 @@ def callbackSetOscPort(value):
view.createGUI()
# init config
initSetLanguageAndCountry()
if model.authenticationTranslator(callbackSetAuthKeys) is False:
# error update Auth key
view.printToTextbox_AuthenticationError()