🐛[bugfix] Controller : DeepL AuthKeyの認証タイミングを修正

This commit is contained in:
misyaguziya
2024-01-14 12:08:58 +09:00
parent 3783a0fff2
commit 135f634c36

View File

@@ -843,16 +843,18 @@ def createMainWindow():
initSetConfigByExeArguments()
initSetTranslateEngine()
initSetLanguageAndCountry()
updateTranslationEngineAndEngineList()
if config.AUTH_KEYS["DeepL_API"] is not None:
if model.authenticationTranslatorDeepLAuthKey("DeepL_API", config.AUTH_KEYS["DeepL_API"]) is False:
if model.authenticationTranslatorDeepLAuthKey(auth_key=config.AUTH_KEYS["DeepL_API"]) is False:
# error update Auth key
auth_keys = config.AUTH_KEYS
auth_keys["DeepL_API"] = None
config.AUTH_KEYS = auth_keys
view.printToTextbox_AuthenticationError()
# set Translation Engine
updateTranslationEngineAndEngineList()
# set word filter
model.addKeywords()