mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +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
|
||||
|
||||
def getXlate( params ):
|
||||
result = None
|
||||
result = []
|
||||
logging.debug( "getXlate:" + json.dumps(params) )
|
||||
locale = params[k_LOCALE]
|
||||
proto = params[k_XLATPROTO]
|
||||
curVers = int(params[k_XLATEVERS])
|
||||
for entry in params:
|
||||
locale = entry[k_LOCALE]
|
||||
curVers = entry[k_XLATEVERS]
|
||||
|
||||
data = mk_for_download.getXlationFor( k_filebase + 'xw4', locale )
|
||||
if data:
|
||||
result = { k_LOCALE: locale,
|
||||
k_OLD: curVers,
|
||||
k_NEW: curVers + 1,
|
||||
k_PAIRS: data,
|
||||
}
|
||||
data = mk_for_download.getXlationFor( k_filebase + 'xw4', locale )
|
||||
if data: result.append( { k_LOCALE: locale,
|
||||
k_OLD: curVers,
|
||||
k_NEW: curVers + "_new",
|
||||
k_PAIRS: data,
|
||||
} )
|
||||
|
||||
if 0 == len(result): result = None
|
||||
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in a new issue