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,10 +8,13 @@ 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 getattr(app.config, 'html_translator_class', None):
|
if hasattr(app, 'set_translator'):
|
||||||
app.warn("Overriding the explicitly set html_translator_class setting",
|
app.set_translator('html', translator.BootstrapTranslator)
|
||||||
location="odoo extension")
|
else:
|
||||||
app.config.html_translator_class = 'odoo.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)
|
switcher.setup(app)
|
||||||
app.add_config_value('odoo_cover_default', None, 'env')
|
app.add_config_value('odoo_cover_default', None, 'env')
|
||||||
|
Loading…
Reference in New Issue
Block a user