I give up on trying to make escaped quotation marks work

This commit is contained in:
2023-01-22 01:46:09 -03:00
parent a7947efa81
commit a412c30ce2
3 changed files with 7 additions and 8 deletions

View File

@ -54,10 +54,11 @@ for file_name in os.listdir('scripts'):
for line in lines:
# Check if the line is commented out
if not line.strip().startswith('#'):
words = line.split('"')[1::2]
words = line.split('"')[1:-1]
# Replace the English string with the translated string
try:
line = line.replace(words[-1],translations[words[-1]])
words = "".join(words)
line = line.replace(words,translations[words])
except:
pass
# Write the modified line to the output file