Only show debug info sometimes

This commit is contained in:
Dusk 2024-02-23 14:36:42 +01:00
parent 8aa2fc6a3a
commit 9f279bccc9
1 changed files with 10 additions and 9 deletions

View File

@ -85,12 +85,6 @@ def write_translated(outfile, origfile, translation_file_paths):
# --- Debug --- # --- Debug ---
global debug_current_line global debug_current_line
debug_current_line += 1 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 # 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') outfile.write('`' + unidecode(line_en) + '\n')
# --- Debug --- # --- Debug ---
print(">", line_en) if lines_written > 0:
print(">", line_jp) print(
print("<", line, end='') "\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: if line_jp+'\n' != line: