From a5c83efd7c67b08c47f01fbdf5f778c8ed139abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 27 Jan 2024 23:50:28 +0800 Subject: [PATCH] issues/504 --- LunaTranslator/LunaTranslator/myutils/post.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/post.py b/LunaTranslator/LunaTranslator/myutils/post.py index 32a1bd4c..a0e9ea5a 100644 --- a/LunaTranslator/LunaTranslator/myutils/post.py +++ b/LunaTranslator/LunaTranslator/myutils/post.py @@ -4,7 +4,7 @@ from traceback import print_exc from collections import Counter import importlib,gobject from myutils.utils import getfilemd5 -from myutils.config import postprocessconfig,globalconfig ,savehook_new_data +from myutils.config import postprocessconfig,globalconfig ,savehook_new_data,static_data def _2_f(line,args): times=args['重复次数(若为1则自动分析去重)'] @@ -127,7 +127,12 @@ def _4_f(line): line=re.sub('',"*",line) return line def _6_f(line): - line=line.replace('\r','').replace('\n','') + srclang=static_data["language_list_translator_inner"][globalconfig['srclang3']] + if srclang in ["zh","ja"]: + white='' + else: + white=' ' + line=line.replace('\r',white).replace('\n',white) return line def _91_f(line): line=re.sub('([0-9]+)','',line)