We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef4db2b commit 8c1c537Copy full SHA for 8c1c537
clean_android_strings.py
@@ -4,10 +4,10 @@
4
def clean_android_string(android_string):
5
#\\" -> \"
6
transformed = re.sub(r'\\\\"', '\\"', android_string)
7
- #... -> ellipse
8
- transformed = re.sub(r'\.\.\.', '…', transformed)
+ #... -> ellipse, remove whitespaces before ellipse
+ transformed = re.sub(r'\s*\.\.\.', '…', transformed)
9
#trim whitespace around \n
10
- transformed = re.sub(r'\s*\\n\s*', re.escape('\\') + 'n', transformed)
+ transformed = re.sub(r'\s*\\n\s*', re.escape('\\') + 'n', transformed)
11
#place quotes around strings inside xml tags that do not have them
12
transformed = re.sub(r'\"?</string>', '\"</string>', transformed)
13
transformed = re.sub(r'">"?', '">"', transformed)
0 commit comments