[Update] Message Format: [message]と[translation]は一意かつそれぞれ一つだけの使用に。それに伴いエラー表示や初期値の挿入など。
This commit is contained in:
@@ -8,7 +8,7 @@ from tkinter import font
|
||||
from languages import selectable_languages
|
||||
from models.translation.translation_languages import translatorEngine
|
||||
from models.transcription.transcription_utils import getInputDevices, getDefaultInputDevice
|
||||
from utils import generatePercentageStringsList
|
||||
from utils import generatePercentageStringsList, isUniqueStrings
|
||||
|
||||
json_serializable_vars = {}
|
||||
def json_serializable(var_name):
|
||||
@@ -447,7 +447,7 @@ class Config:
|
||||
@MESSAGE_FORMAT.setter
|
||||
def MESSAGE_FORMAT(self, value):
|
||||
if type(value) is str:
|
||||
if "[message]" not in value or "[translation]" not in value:
|
||||
if isUniqueStrings(["[message]", "[translation]"], value) is False:
|
||||
value = "[message]([translation])"
|
||||
self._MESSAGE_FORMAT = value
|
||||
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
|
||||
|
||||
Reference in New Issue
Block a user