[FIX] doc: odoo theme so it's compatible with Sphinx 1.2 / 1.3
Sphinx.set_translator is a Sphinx 1.3 API, and we only require Sphinx 1.2 at this point. Replace the use of set_translator with explicitly setting the html_translator_class config setting. Coming from the Odoo technical documentation, fix done by @xmo-odoo. See odoo/odoo/commit/a139d81c46b669fa9186ceaf2a0ca43fb0601e1c.
This commit is contained in:
parent
2175c37a53
commit
8151a78aed
@ -2,13 +2,15 @@
|
||||
|
||||
from . import pygments_override
|
||||
from . import switcher
|
||||
from . import translator
|
||||
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user