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:
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: