Update translator.py

This commit is contained in:
SirBroccoli
2025-04-15 00:04:20 +02:00
committed by GitHub
parent 02f3d3d27e
commit 653f16bf02

View File

@@ -190,6 +190,8 @@ Also don't add any extra stuff in your response that is not part of the translat
return translate_text(language, text, file_path, model, cont, False, client)
response_message = response.choices[0].message.content.strip()
response_message = response_message.replace("bypassy", "bypasses") # PL translations translates that from time to time
response_message = response_message.replace("Bypassy", "Bypasses")
# Sometimes chatgpt modified the number of "#" at the beginning of the text, so we need to fix that. This is specially important for the first line of the MD that mucst have only 1 "#"
cont2 = 0