[tor-commits] [orbot/master] ./fix-translations script to fix common problems in the strings.xml

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Jun 25 14:59:58 UTC 2015


commit d55c7b7eaf7856a6be1bb118559b2ae880892b31
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Wed Jun 3 18:00:28 2015 -0400

    ./fix-translations script to fix common problems in the strings.xml
---
 fix-translations |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fix-translations b/fix-translations
new file mode 100755
index 0000000..7402fe0
--- /dev/null
+++ b/fix-translations
@@ -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





More information about the tor-commits mailing list