Should lower the untranslated lines

This commit is contained in:
2022-12-30 18:20:19 -03:00
parent 80fba5c0e7
commit 306788e25e

View File

@ -54,9 +54,8 @@ for file_name in os.listdir('scripts'):
for line in lines:
# Check if the line is commented out
if not line.strip().startswith('#'):
# Iterate through the translations
for english_string, spanish_translation in translations.items():
# Replace the English string with the translated string
line = line.replace(english_string, spanish_translation)
words = line.split('"')[1::2]
# Replace the English string with the translated string
line = line.replace(english_string, translations[words[-1]])
# Write the modified line to the output file
output_file.write(line)