mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
html_translator_class
is now deprecated
This commit is contained in:
parent
52fef90600
commit
bb46bf591d
2
CHANGES
2
CHANGES
@ -44,6 +44,8 @@ Incompatible changes
|
|||||||
* Fix ``genindex.html`` to satisfy xhtml standard.
|
* Fix ``genindex.html`` to satisfy xhtml standard.
|
||||||
* Use epub3 builder by default. And the old epub builder is renamed to epub2.
|
* Use epub3 builder by default. And the old epub builder is renamed to epub2.
|
||||||
* Fix ``epub`` and ``epub3`` builders that contained links to ``genindex`` even if ``epub_use_index = False``.
|
* Fix ``epub`` and ``epub3`` builders that contained links to ``genindex`` even if ``epub_use_index = False``.
|
||||||
|
* `html_translator_class` is now deprecated.
|
||||||
|
Use `Sphinx.set_translator()` API instead.
|
||||||
|
|
||||||
Features added
|
Features added
|
||||||
--------------
|
--------------
|
||||||
|
@ -910,6 +910,11 @@ that use Sphinx's HTMLWriter class.
|
|||||||
|
|
||||||
.. seealso:: :meth:`~sphinx.application.Sphinx.set_translator`
|
.. seealso:: :meth:`~sphinx.application.Sphinx.set_translator`
|
||||||
|
|
||||||
|
.. deprecated:: 1.5
|
||||||
|
|
||||||
|
Implement your translator as extension and use `Sphinx.set_translator`
|
||||||
|
instead.
|
||||||
|
|
||||||
.. confval:: html_show_copyright
|
.. confval:: html_show_copyright
|
||||||
|
|
||||||
If true, "(C) Copyright ..." is shown in the HTML footer. Default is
|
If true, "(C) Copyright ..." is shown in the HTML footer. Default is
|
||||||
|
@ -1183,6 +1183,12 @@ class JSONHTMLBuilder(SerializingHTMLBuilder):
|
|||||||
SerializingHTMLBuilder.init(self)
|
SerializingHTMLBuilder.init(self)
|
||||||
|
|
||||||
|
|
||||||
|
def validate_config_values(app):
|
||||||
|
if app.config.html_translator_class:
|
||||||
|
app.warn('html_translator_class is deprecated. '
|
||||||
|
'Use Sphinx.set_translator() API instead.')
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
# builders
|
# builders
|
||||||
app.add_builder(StandaloneHTMLBuilder)
|
app.add_builder(StandaloneHTMLBuilder)
|
||||||
@ -1191,6 +1197,8 @@ def setup(app):
|
|||||||
app.add_builder(PickleHTMLBuilder)
|
app.add_builder(PickleHTMLBuilder)
|
||||||
app.add_builder(JSONHTMLBuilder)
|
app.add_builder(JSONHTMLBuilder)
|
||||||
|
|
||||||
|
app.connect('builder-inited', validate_config_values)
|
||||||
|
|
||||||
# config values
|
# config values
|
||||||
app.add_config_value('html_theme', 'alabaster', 'html')
|
app.add_config_value('html_theme', 'alabaster', 'html')
|
||||||
app.add_config_value('html_theme_path', [], 'html')
|
app.add_config_value('html_theme_path', [], 'html')
|
||||||
|
Loading…
Reference in New Issue
Block a user