mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
add param caller expects
This commit is contained in:
parent
36f839f8d1
commit
780b22678e
1 changed files with 8 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue