./fix-translations script to fix common problems in the strings.xml

This commit is contained in:
Hans-Christoph Steiner 2015-06-03 18:00:28 -04:00
parent 333343fd3d
commit d55c7b7eaf
1 changed files with 10 additions and 0 deletions

10
fix-translations Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash -x
# Fix TypographyEllipsis programmatically
sed -i 's/\.\.\./…/g' res/values*/*.xml
# Replace "--" with an "em dash" character
sed -i 's,\(\>[^\<]*\)--\([^\>]\),\1—\2,g' res/values*/*.xml
# make sure apostrophes in strings are escaped
sed -i "s,\(>[^<]*[^\\]\)',\1\\\\',gp" res/values*/*.xml