Browse Source

[FIX] doc: odoo theme so it's compatible with Sphinx 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.
master
Xavier Morel 6 years ago
parent
commit
a139d81c46
  1. 6
      doc/_extensions/odoo/__init__.py

6
doc/_extensions/odoo/__init__.py

@ -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…
Cancel
Save