Skip to content

Commit

Permalink
Also replace non-escaped arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
mpretty-cyro committed Sep 18, 2024
1 parent 680099e commit 26a180b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crowdin/generate_android_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def clean_string(text):
text = text.replace("&lt;/b&gt;", "</b>")
text = text.replace("&lt;/br&gt;", "\\n")
text = text.replace("-&gt;", "→") # Use the special unicode for arrows
text = text.replace("->", "→") # Use the special unicode for arrows
text = text.replace("&lt;-", "←") # Use the special unicode for arrows
text = text.replace("<-", "←") # Use the special unicode for arrows
text = text.replace("<br/>", "\\n")
text = text.replace("&", "&amp;") # Assume any remaining ampersands are desired
return text.strip() # Strip whitespace
Expand Down
2 changes: 2 additions & 0 deletions crowdin/generate_desktop_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def parse_xliff(file_path):

def clean_string(text):
text = text.replace("-&gt;", "→") # Use the special unicode for arrows
text = text.replace("->", "→") # Use the special unicode for arrows
text = text.replace("&lt;-", "←") # Use the special unicode for arrows
text = text.replace("<-", "←") # Use the special unicode for arrows
text = html.unescape(text) # Unescape any HTML escaping
return text.strip() # Strip whitespace

Expand Down
2 changes: 2 additions & 0 deletions crowdin/generate_ios_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def parse_xliff(file_path):

def clean_string(text):
text = text.replace("-&gt;", "→") # Use the special unicode for arrows
text = text.replace("->", "→") # Use the special unicode for arrows
text = text.replace("&lt;-", "←") # Use the special unicode for arrows
text = text.replace("<-", "←") # Use the special unicode for arrows
text = html.unescape(text) # Unescape any HTML escaping
return text.strip() # Strip whitespace

Expand Down

0 comments on commit 26a180b

Please sign in to comment.