Skip to content

Commit

Permalink
also remove whitespace before ellipses
Browse files Browse the repository at this point in the history
  • Loading branch information
ratana committed Feb 7, 2013
1 parent ef4db2b commit 8c1c537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clean_android_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
def clean_android_string(android_string):
#\\" -> \"
transformed = re.sub(r'\\\\"', '\\"', android_string)
#... -> ellipse
transformed = re.sub(r'\.\.\.', '…', transformed)
#... -> ellipse, remove whitespaces before ellipse
transformed = re.sub(r'\s*\.\.\.', '…', transformed)
#trim whitespace around \n
transformed = re.sub(r'\s*\\n\s*', re.escape('\\') + 'n', transformed)
transformed = re.sub(r'\s*\\n\s*', re.escape('\\') + 'n', transformed)
#place quotes around strings inside xml tags that do not have them
transformed = re.sub(r'\"?</string>', '\"</string>', transformed)
transformed = re.sub(r'">"?', '">"', transformed)
Expand Down

0 comments on commit 8c1c537

Please sign in to comment.