[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.
This commit is contained in:
Xavier Morel 2015-09-15 16:02:44 +02:00
parent 2474a91bc9
commit a139d81c46
1 changed files with 4 additions and 2 deletions

View File

@ -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')