def translated_revision(locale='de', **kwargs):
 parent_rev = revision(is_approved=True)
 parent_rev.save()
 translation = document(parent=parent_rev.document, locale=locale)
 translation.save()
 new_kwargs = {'document': translation, 'based_on': parent_rev}
 new_kwargs.update(kwargs)
 return revision(**new_kwargs)

def translated_revision ( locale = 'de' , ** kwargs ) : parent_rev = revision ( is_approved = True ) parent_rev . save ( ) translation = document ( parent = parent_rev . document , locale = locale ) translation . save ( ) new_kwargs = { 'document' : translation , 'based_on' : parent_rev } new_kwargs . update ( kwargs ) return revision ( ** new_kwargs )
return a revision that is the translation of a default-language one .