👍️[Update] Controller : メッセージフォーマットの翻訳を改行で表現するように変更

This commit is contained in:
misyaguziya
2024-12-14 19:07:32 +09:00
parent b3a4a25504
commit cf04771d32
2 changed files with 5 additions and 5 deletions

View File

@@ -933,9 +933,9 @@ class Config:
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_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_WITH_T = "[message]([translation])"
self._RECEIVED_MESSAGE_FORMAT_WITH_T = "[message]\n[translation]"
# Read Write
self._ENABLE_TRANSLATION = False

View File

@@ -1414,10 +1414,10 @@ class Controller:
raise ValueError("format_type is not found", format_type)
if len(translation) > 0:
osc_message = FORMAT_WITH_T.replace("[message]", "/".join(message))
osc_message = osc_message.replace("[translation]", "/".join(translation))
osc_message = FORMAT_WITH_T.replace("[message]", "\n".join(message))
osc_message = osc_message.replace("[translation]", "\n".join(translation))
else:
osc_message = FORMAT.replace("[message]", "/".join(message))
osc_message = FORMAT.replace("[message]", "\n".join(message))
return osc_message
def changeToCTranslate2Process(self) -> None: