From 9f279bccc95365788e17731d9c062a4742da42e5 Mon Sep 17 00:00:00 2001 From: dusk Date: Fri, 23 Feb 2024 14:36:42 +0100 Subject: [PATCH] Only show debug info sometimes --- src/orig.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/orig.py b/src/orig.py index df5f96e..b7ccbaa 100755 --- a/src/orig.py +++ b/src/orig.py @@ -85,12 +85,6 @@ def write_translated(outfile, origfile, translation_file_paths): # --- Debug --- global debug_current_line debug_current_line += 1 - print( - "\n-", - debug_current_line, - transfilepath, - ''.join(str(x) for x in tokens), - ) # ------------- # Replace the text tokens with the translated ones @@ -101,9 +95,16 @@ def write_translated(outfile, origfile, translation_file_paths): outfile.write('`' + unidecode(line_en) + '\n') # --- Debug --- - print(">", line_en) - print(">", line_jp) - print("<", line, end='') + if lines_written > 0: + print( + "\n-", + debug_current_line, + transfilepath, + ''.join(str(x) for x in tokens), + ) + print(">", line_en) + print(">", line_jp) + print("<", line, end='') # ------------- if line_jp+'\n' != line: