add param caller expects

This commit is contained in:
Eric House 2014-04-23 19:35:35 -07:00
parent 36f839f8d1
commit 780b22678e

View file

@ -21,13 +21,17 @@ def asMap( path ):
if 'string' == elem.tag: if 'string' == elem.tag:
text = elem.text text = elem.text
if 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 map[elem.get('name')] = text
return map return map
def getXlationFor( loc ): def getXlationFor( base, loc ):
eng = asMap( english ) eng = asMap( base + '/' + english )
other = asMap( other_f % (loc) ) other = asMap( base + '/' + other_f % (loc) )
result = [] result = []
for key in eng.keys(): for key in eng.keys():
if key in other: if key in other: