mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
work with arrays of locales
This commit is contained in:
parent
8612a5f624
commit
7ea037d56a
1 changed files with 12 additions and 11 deletions
|
@ -247,19 +247,20 @@ def getDicts( params ):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def getXlate( params ):
|
def getXlate( params ):
|
||||||
result = None
|
result = []
|
||||||
logging.debug( "getXlate:" + json.dumps(params) )
|
logging.debug( "getXlate:" + json.dumps(params) )
|
||||||
locale = params[k_LOCALE]
|
for entry in params:
|
||||||
proto = params[k_XLATPROTO]
|
locale = entry[k_LOCALE]
|
||||||
curVers = int(params[k_XLATEVERS])
|
curVers = entry[k_XLATEVERS]
|
||||||
|
|
||||||
data = mk_for_download.getXlationFor( k_filebase + 'xw4', locale )
|
data = mk_for_download.getXlationFor( k_filebase + 'xw4', locale )
|
||||||
if data:
|
if data: result.append( { k_LOCALE: locale,
|
||||||
result = { k_LOCALE: locale,
|
k_OLD: curVers,
|
||||||
k_OLD: curVers,
|
k_NEW: curVers + "_new",
|
||||||
k_NEW: curVers + 1,
|
k_PAIRS: data,
|
||||||
k_PAIRS: data,
|
} )
|
||||||
}
|
|
||||||
|
if 0 == len(result): result = None
|
||||||
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue