diff --git a/lib/ui/home/input_method/input_method_dialog_ui_model.dart b/lib/ui/home/input_method/input_method_dialog_ui_model.dart index 9ffe101..be0cb62 100644 --- a/lib/ui/home/input_method/input_method_dialog_ui_model.dart +++ b/lib/ui/home/input_method/input_method_dialog_ui_model.dart @@ -166,7 +166,8 @@ class InputMethodDialogUIModel extends _$InputMethodDialogUIModel { _translateTimer = Timer(Duration(milliseconds: webMessage ? 1 : 400), () async { try { - final r = await Api.doGoogleTranslate(sourceText); + final inputText = sourceText.replaceAll("\n", " "); + final r = await Api.doGoogleTranslate(inputText); if (r != null) { String resultText = r; // resultText 首字母大写