From 59b5d1228fa3658781ed759a102bec086996c90e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 16 Jun 2021 18:26:25 +0800 Subject: [PATCH] Don't override unchanged --- tool/translation_repair/translation_repair.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/translation_repair/translation_repair.py b/tool/translation_repair/translation_repair.py index a4cd26638..7b5441510 100644 --- a/tool/translation_repair/translation_repair.py +++ b/tool/translation_repair/translation_repair.py @@ -214,8 +214,8 @@ def processWordsDiff(wk, tl): if s[1] in wkMap: h = wkMap[s[1]] l = h + l[len(s[0]):] - elif s[0] != "*HASH_VALUE": - l = "0000000000000000" + l[len(s[0]):] + elif s[0] != "*HASH_VALUE" and len(s[0]) < 16: + l = "_0000000000000000" + l[len(s[0]):] fw.write(l) os.replace(tl + ".new", tl)