From 4db252b045778d7ce6e76f19293990a61ebe993e Mon Sep 17 00:00:00 2001 From: Juuso Rytilahti <rytilahti.juuso@gmail.com> Date: Tue, 19 Sep 2023 16:25:39 +0300 Subject: [PATCH] After every chunk is translated, the content of output.md is overwritten --- translator_script.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/translator_script.py b/translator_script.py index 3bff33e..8e6b5cf 100644 --- a/translator_script.py +++ b/translator_script.py @@ -252,7 +252,10 @@ if file_content: if not USE_DEBUG_TEXT_IN_THE_OUTPUT: final_text = final_text + trans # exclude the debug text else: - final_text =final_text + chunk_divination + trans + final_text =final_text + chunk_divination + trans + # In case the translation fails to an error when only part of the translation is done + # write the currently translated text also to the output.md + write_to_file("output.md", final_text) print(" ") print(" ") write_to_file("output.md", final_text) -- GitLab