diff --git a/tutorials/source_zh_cn/conf.py b/tutorials/source_zh_cn/conf.py index 2bf7adf79e2d0edf71994970de53a1dd2929258a..8c549c81b6e350217ac650b1dc5e8bd42020a508 100644 --- a/tutorials/source_zh_cn/conf.py +++ b/tutorials/source_zh_cn/conf.py @@ -95,7 +95,17 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# + +# Reconstruction of sphinx auto generated document translation. +import sphinx +import shutil +mo_target = os.path.join(os.path.dirname(sphinx.__file__), 'locale/zh_CN/LC_MESSAGES/sphinx.mo') +if os.path.exists(mo_target): + os.remove(mo_target) +language = 'zh_CN' +locale_dirs = ['../../resource/locale/'] +gettext_compact = False + html_theme = 'sphinx_rtd_theme' #modify layout.html for sphinx_rtd_theme. import sphinx_rtd_theme