diff options
Diffstat (limited to '')
-rw-r--r-- | tests/roots/test-api-set-translator/conf.py | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/roots/test-api-set-translator/conf.py b/tests/roots/test-api-set-translator/conf.py new file mode 100644 index 0000000..671f390 --- /dev/null +++ b/tests/roots/test-api-set-translator/conf.py @@ -0,0 +1,72 @@ +# set this by test +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +from docutils.writers.docutils_xml import XMLTranslator + +from sphinx.writers.html import HTMLTranslator +from sphinx.writers.latex import LaTeXTranslator +from sphinx.writers.manpage import ManualPageTranslator +from sphinx.writers.texinfo import TexinfoTranslator +from sphinx.writers.text import TextTranslator + +project = 'test' + + +class ConfHTMLTranslator(HTMLTranslator): + pass + + +class ConfDirHTMLTranslator(HTMLTranslator): + pass + + +class ConfSingleHTMLTranslator(HTMLTranslator): + pass + + +class ConfPickleTranslator(HTMLTranslator): + pass + + +class ConfJsonTranslator(HTMLTranslator): + pass + + +class ConfLaTeXTranslator(LaTeXTranslator): + pass + + +class ConfManualPageTranslator(ManualPageTranslator): + pass + + +class ConfTexinfoTranslator(TexinfoTranslator): + pass + + +class ConfTextTranslator(TextTranslator): + pass + + +class ConfXMLTranslator(XMLTranslator): + pass + + +class ConfPseudoXMLTranslator(XMLTranslator): + pass + + +def setup(app): + app.set_translator('html', ConfHTMLTranslator) + app.set_translator('dirhtml', ConfDirHTMLTranslator) + app.set_translator('singlehtml', ConfSingleHTMLTranslator) + app.set_translator('pickle', ConfPickleTranslator) + app.set_translator('json', ConfJsonTranslator) + app.set_translator('latex', ConfLaTeXTranslator) + app.set_translator('man', ConfManualPageTranslator) + app.set_translator('texinfo', ConfTexinfoTranslator) + app.set_translator('text', ConfTextTranslator) + app.set_translator('xml', ConfXMLTranslator) + app.set_translator('pseudoxml', ConfPseudoXMLTranslator) |