Fix custom translator setup
Programmatically setting html_translator_class is apparently broken in Sphinx 1.5 (which sorta makes sense, it's a bit of a hack, I'm not sure why we even did that instead of going through the configuration object).
This commit is contained in:
parent
0bffbb2865
commit
95b64ca2de
@ -8,6 +8,9 @@ import sphinx.environment
|
|||||||
import sphinx.builders.html
|
import sphinx.builders.html
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
def setup(app):
|
def setup(app):
|
||||||
|
if hasattr(app, 'set_translator'):
|
||||||
|
app.set_translator('html', translator.BootstrapTranslator)
|
||||||
|
else:
|
||||||
if getattr(app.config, 'html_translator_class', None):
|
if getattr(app.config, 'html_translator_class', None):
|
||||||
app.warn("Overriding the explicitly set html_translator_class setting",
|
app.warn("Overriding the explicitly set html_translator_class setting",
|
||||||
location="odoo extension")
|
location="odoo extension")
|
||||||
|
Loading…
Reference in New Issue
Block a user