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