Fixes it for real this time. Should be fine as long as string doesn't have escaped quotation marks. Also is now blazing fast

This commit is contained in:
2022-12-31 02:41:54 -03:00
parent 306788e25e
commit a3b5e81cff

View File

@ -56,6 +56,9 @@ for file_name in os.listdir('scripts'):
if not line.strip().startswith('#'):
words = line.split('"')[1::2]
# Replace the English string with the translated string
line = line.replace(english_string, translations[words[-1]])
try:
line = line.replace(words[-1],translations[words[-1]])
except:
pass
# Write the modified line to the output file
output_file.write(line)