[gen] One can now specify a different source language for every translation.

This commit is contained in:
Gaetan Delannay 2013-01-09 10:46:14 +01:00
parent 6ee3d6ded9
commit f091b25c98
2 changed files with 16 additions and 9 deletions

View file

@ -183,12 +183,13 @@ class Group(ModelClass):
# The Translation class --------------------------------------------------------
class Translation(ModelClass):
_appy_attributes = ['po', 'title']
_appy_attributes = ['po', 'title', 'sourceLanguage']
# All methods defined below are fake. Real versions are in the wrapper.
actionsPage = gen.Page('actions')
def getPoFile(self): pass
po = gen.Action(action=getPoFile, page=gen.Page('actions', show='view'),
result='filetmp')
title = gen.String(show=False, indexed=True)
po = gen.Action(action=getPoFile, page=actionsPage, result='filetmp')
sourceLanguage = gen.String(page=actionsPage, width=4)
title = gen.String(show=False, indexed=True, page=actionsPage)
def label(self): pass
def show(self, name): pass