Skip to content

Commit

Permalink
translator fix to include periods in InfoPlist.strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Manrique committed Dec 2, 2024
1 parent e6d8b01 commit ab5a5a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def translate_ios_infoplist_strings():
result = response.json()

translated_text = result.get("translations", [{}])[0].get("text", "").strip()
translated_line = f'{key} = "{translated_text}";'
translated_text = translated_text.replace('"', '\"') # Escape quotes in translated text
translated_line = f'{key} = "{translated_text}";' # Ensure translated string is always within quotes
translated_file.write(translated_line + '\n')
print(f"{value} --> {translated_text}")
else:
Expand Down

0 comments on commit ab5a5a4

Please sign in to comment.