[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:
@@ -8,7 +8,10 @@ import sphinx.environment
|
||||
import sphinx.builders.html
|
||||
from docutils import nodes
|
||||
def setup(app):
|
||||
app.set_translator('html', translator.BootstrapTranslator)
|
||||
if getattr(app.config, 'html_translator_class', None):
|
||||
app.warn("Overriding the explicitly set html_translator_class setting",
|
||||
location="odoo extension")
|
||||
app.config.html_translator_class = 'odoo.translator.BootstrapTranslator'
|
||||
|
||||
switcher.setup(app)
|
||||
app.add_config_value('odoo_cover_default', None, 'env')
|
||||
|
||||
Reference in New Issue
Block a user