👍️[Update] Controller : メッセージフォーマットの翻訳を改行で表現するように変更
This commit is contained in:
@@ -933,9 +933,9 @@ class Config:
|
|||||||
self._SELECTABLE_COMPUTE_DEVICE_LIST.append({"device":"cpu", "device_index": 0, "device_name": "cpu"})
|
self._SELECTABLE_COMPUTE_DEVICE_LIST.append({"device":"cpu", "device_index": 0, "device_name": "cpu"})
|
||||||
self._SEND_MESSAGE_BUTTON_TYPE_LIST = ["show", "hide", "show_and_disable_enter_key"]
|
self._SEND_MESSAGE_BUTTON_TYPE_LIST = ["show", "hide", "show_and_disable_enter_key"]
|
||||||
self._SEND_MESSAGE_FORMAT = "[message]"
|
self._SEND_MESSAGE_FORMAT = "[message]"
|
||||||
self._SEND_MESSAGE_FORMAT_WITH_T = "[message]([translation])"
|
self._SEND_MESSAGE_FORMAT_WITH_T = "[message]\n[translation]"
|
||||||
self._RECEIVED_MESSAGE_FORMAT = "[message]"
|
self._RECEIVED_MESSAGE_FORMAT = "[message]"
|
||||||
self._RECEIVED_MESSAGE_FORMAT_WITH_T = "[message]([translation])"
|
self._RECEIVED_MESSAGE_FORMAT_WITH_T = "[message]\n[translation]"
|
||||||
|
|
||||||
# Read Write
|
# Read Write
|
||||||
self._ENABLE_TRANSLATION = False
|
self._ENABLE_TRANSLATION = False
|
||||||
|
|||||||
@@ -1414,10 +1414,10 @@ class Controller:
|
|||||||
raise ValueError("format_type is not found", format_type)
|
raise ValueError("format_type is not found", format_type)
|
||||||
|
|
||||||
if len(translation) > 0:
|
if len(translation) > 0:
|
||||||
osc_message = FORMAT_WITH_T.replace("[message]", "/".join(message))
|
osc_message = FORMAT_WITH_T.replace("[message]", "\n".join(message))
|
||||||
osc_message = osc_message.replace("[translation]", "/".join(translation))
|
osc_message = osc_message.replace("[translation]", "\n".join(translation))
|
||||||
else:
|
else:
|
||||||
osc_message = FORMAT.replace("[message]", "/".join(message))
|
osc_message = FORMAT.replace("[message]", "\n".join(message))
|
||||||
return osc_message
|
return osc_message
|
||||||
|
|
||||||
def changeToCTranslate2Process(self) -> None:
|
def changeToCTranslate2Process(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user