mirror of
https://github.com/odoo/documentation.git
synced 2026-01-02 09:49:17 +07:00
[FIX] 1.2 compatibility
app.add_node doesn't work right for custom translators in 1.2, since mementos are using ``h:div`` reimplement that in the BootstrapTranslator. Alternative would be to monkeypatch app.add_node for Sphinx 1.2, but let's not do that...
This commit is contained in:
@@ -677,3 +677,15 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
|
||||
|
||||
# internal node
|
||||
def visit_substitution_definition(self, node): raise nodes.SkipNode
|
||||
|
||||
# without set_translator, add_node doesn't work correctly, so the
|
||||
# serialization of html_domain nodes needs to be embedded here
|
||||
def visit_div(self, node):
|
||||
self.body.append(self.starttag(node, 'div'))
|
||||
def depart_div(self, node):
|
||||
self.body.append(u'</div>\n')
|
||||
def visit_address(self, node):
|
||||
self.body.append(self.starttag(node, 'address'))
|
||||
def depart_address(self, node):
|
||||
self.body.append(u'</address>')
|
||||
# TODO: inline elements
|
||||
|
||||
Reference in New Issue
Block a user