From a4ac82fe7e39a01c5c4d9f58f60bb887b1e4beef Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Fri, 13 Sep 2024 16:08:58 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Controller=20:?= =?UTF-8?q?=20=20callbackSetUiLanguage=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit utils.getKeyByValueを削除 --- src-python/utils.py | 6 ------ src-python/webui_controller.py | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src-python/utils.py b/src-python/utils.py index eb991c39..fbf55c43 100644 --- a/src-python/utils.py +++ b/src-python/utils.py @@ -10,12 +10,6 @@ def getImageFile(file_name): img = Image_open(os_path.join(os_path.dirname(__file__), "img", file_name)) return img -def getKeyByValue(dictionary, value): - for key, val in dictionary.items(): - if val == value: - return key - return None - def callFunctionIfCallable(function, *args): if callable(function) is True: function(*args) diff --git a/src-python/webui_controller.py b/src-python/webui_controller.py index d0c10985..f7c94c69 100644 --- a/src-python/webui_controller.py +++ b/src-python/webui_controller.py @@ -5,7 +5,7 @@ from threading import Thread import re from config import config from model import model -from utils import getKeyByValue, isUniqueStrings, printLog, printResponse +from utils import isUniqueStrings, printLog, printResponse # Common class DownloadSoftwareProgressBar: @@ -663,7 +663,6 @@ def callbackSetFontFamily(data, *args, **kwargs) -> dict: def callbackSetUiLanguage(data, *args, **kwargs) -> dict: printLog("Set UI Language", data) - data = getKeyByValue(config.SELECTABLE_UI_LANGUAGES_DICT, data) config.UI_LANGUAGE = data return {"status":200, "result":config.UI_LANGUAGE}