From 780b22678e57f17681149f6f67406920e77410cf Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 23 Apr 2014 19:35:35 -0700 Subject: [PATCH] add param caller expects --- xwords4/android/scripts/mk_for_download.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xwords4/android/scripts/mk_for_download.py b/xwords4/android/scripts/mk_for_download.py index cdeca45c8..17d4d08ce 100755 --- a/xwords4/android/scripts/mk_for_download.py +++ b/xwords4/android/scripts/mk_for_download.py @@ -21,13 +21,17 @@ def asMap( path ): if 'string' == elem.tag: text = elem.text if text: - text = " ".join(re.split('\s+', text)).replace('"', '\"') + # print 'text before:', text + text = " ".join(re.split('\s+', text)) \ + .replace("\\'", "'") \ + .replace( '\\"', '"' ) + # print 'text after:', text map[elem.get('name')] = text return map -def getXlationFor( loc ): - eng = asMap( english ) - other = asMap( other_f % (loc) ) +def getXlationFor( base, loc ): + eng = asMap( base + '/' + english ) + other = asMap( base + '/' + other_f % (loc) ) result = [] for key in eng.keys(): if key in other: