From cf04771d32c49174a82dd8a315efa1f27d4caf3c Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:07:32 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Controller=20:?= =?UTF-8?q?=20=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=E3=81=AE=E7=BF=BB?= =?UTF-8?q?=E8=A8=B3=E3=82=92=E6=94=B9=E8=A1=8C=E3=81=A7=E8=A1=A8=E7=8F=BE?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/config.py | 4 ++-- src-python/webui_controller.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src-python/config.py b/src-python/config.py index 2a401ea5..caee7beb 100644 --- a/src-python/config.py +++ b/src-python/config.py @@ -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 diff --git a/src-python/webui_controller.py b/src-python/webui_controller.py index 976e1fad..7ca58b07 100644 --- a/src-python/webui_controller.py +++ b/src-python/webui_controller.py @@ -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: