From 83b8899414a9b5119c6857c2018af9fdca4e778d Mon Sep 17 00:00:00 2001 From: dignow Date: Thu, 29 Jun 2023 22:35:52 +0800 Subject: [PATCH] remove translate _tip in a sentence with other words Signed-off-by: dignow --- flutter/lib/common.dart | 9 +-------- src/ui/msgbox.tis | 9 --------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index d294cb573..4beda68ef 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1006,14 +1006,7 @@ Widget msgboxContent(String type, String title, String text) { } text = words.join(': '); } else { - List words = text.split(' '); - if (words.length > 1 && words[0].endsWith('_tip')) { - words[0] = translate(words[0]); - final rest = text.substring(words[0].length + 1); - text = '${words[0]} ${translate(rest)}'; - } else { - text = translate(text); - } + text = translate(text); } return text; } diff --git a/src/ui/msgbox.tis b/src/ui/msgbox.tis index d54b22c8e..8d54bf22c 100644 --- a/src/ui/msgbox.tis +++ b/src/ui/msgbox.tis @@ -5,15 +5,6 @@ function translate_text(text) { fds[i] = translate(fds[i]); } text = fds.join(': '); - } else { - var fds = text.split(' '); - if (fds.length > 1 && fds[0].slice(-4) === '_tip') { - fds[0] = translate(fds[0]); - var rest = text.substring(fds[0].length + 1); - text = fds[0] + ' ' + translate(rest); - } else { - text = translate(text); - } } return text; }