mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +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:
|
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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue