appy.gen: in the default context of any pod field, added function '_' corresponding to obj.translate; appy.gen: xhtml2odt bugfix: when a <div> was contained in <ol><li> or <ul><li>, the whole function ouput was an empty string.
This commit is contained in:
parent
02fce03143
commit
93eb16670b
|
@ -2101,7 +2101,7 @@ class Pod(Type):
|
|||
# Define parameters to give to the appy.pod renderer
|
||||
podContext = {'tool': tool, 'user': obj.user, 'self': obj,
|
||||
'now': obj.o.getProductConfig().DateTime(),
|
||||
'projectFolder': tool.getDiskFolder()}
|
||||
'_': obj.translate, 'projectFolder': tool.getDiskFolder()}
|
||||
# If the POD document is related to a query, get it from the request,
|
||||
# execute it and put the result in the context.
|
||||
isQueryRelated = rq.get('queryData', None)
|
||||
|
|
3505
pod/test/Tests.rtf
3505
pod/test/Tests.rtf
File diff suppressed because it is too large
Load diff
8
pod/test/contexts/XhtmlComplex8.py
Normal file
8
pod/test/contexts/XhtmlComplex8.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
xhtmlInput = '''
|
||||
<ol><li>
|
||||
<div style="text-align: justify;">Le Gouvernement adopte le projet d’arrêté modifiant l'arrêté du 9 février 1998 portant délégations de compétence et de signature aux fonctionnaires généraux et à certains autres agents des services du Gouvernement de la Communauté française - Ministère de la Communauté française.</div>
|
||||
</li><li>
|
||||
<div style="text-align: justify;">Il charge le Ministre de la Fonction publique de l'exécution de la présente décision.</div>
|
||||
</li></ol>
|
||||
<p class="pmParaKeepWithNext"> </p>
|
||||
'''
|
BIN
pod/test/results/xhtmlComplex8.odt
Normal file
BIN
pod/test/results/xhtmlComplex8.odt
Normal file
Binary file not shown.
|
@ -106,7 +106,8 @@ class HtmlElement:
|
|||
if (parentElem.elemType == 'para') and \
|
||||
(self.elem in NOT_INSIDE_P_OR_P):
|
||||
# Oups, li->p wrongly considered as a conflict.
|
||||
if (parentElem.elem == 'li') and (self.elem == 'p'): return ()
|
||||
if (parentElem.elem == 'li') and (self.elem in ('p', 'div')):
|
||||
return ()
|
||||
return (parentElem.setConflictual(),)
|
||||
# Check inner paragraphs
|
||||
if (parentElem.elem in INNER_TAGS) and (self.elemType == 'para'):
|
||||
|
|
Loading…
Reference in a new issue