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:
@ -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)
|
||||
|
Reference in New Issue
Block a user