Add multilingual documentation support (#12952)

* Add multilingual documentation support

* Add multilingual documentation support

* make style

* make style

* revert
This commit is contained in:
Kevin Canwen Xu
2021-07-30 20:56:14 +08:00
committed by GitHub
parent fe6ff4a920
commit 8ff619d95e
3 changed files with 6 additions and 0 deletions

View File

@@ -208,6 +208,9 @@ epub_title = project
# A list of files that should not be packed into the epub file. # A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"] epub_exclude_files = ["search.html"]
# Localization
locale_dirs = ['locale/']
gettext_compact = False
def setup(app): def setup(app):
app.add_css_file("css/huggingface.css") app.add_css_file("css/huggingface.css")

View File

@@ -142,6 +142,7 @@ _deps = [
"sphinx-rtd-theme==0.4.3", # sphinx-rtd-theme==0.5.0 introduced big changes in the style. "sphinx-rtd-theme==0.4.3", # sphinx-rtd-theme==0.5.0 introduced big changes in the style.
"sphinx==3.2.1", "sphinx==3.2.1",
"sphinxext-opengraph==0.4.1", "sphinxext-opengraph==0.4.1",
"sphinx-intl",
"starlette", "starlette",
"tensorflow-cpu>=2.3", "tensorflow-cpu>=2.3",
"tensorflow>=2.3", "tensorflow>=2.3",
@@ -289,6 +290,7 @@ extras["docs_specific"] = deps_list(
"sphinx-rtd-theme", "sphinx-rtd-theme",
"sphinx-copybutton", "sphinx-copybutton",
"sphinxext-opengraph", "sphinxext-opengraph",
"sphinx-intl",
) )
# "docs" needs "all" to resolve all the references # "docs" needs "all" to resolve all the references
extras["docs"] = extras["all"] + extras["docs_specific"] extras["docs"] = extras["all"] + extras["docs_specific"]

View File

@@ -59,6 +59,7 @@ deps = {
"sphinx-rtd-theme": "sphinx-rtd-theme==0.4.3", "sphinx-rtd-theme": "sphinx-rtd-theme==0.4.3",
"sphinx": "sphinx==3.2.1", "sphinx": "sphinx==3.2.1",
"sphinxext-opengraph": "sphinxext-opengraph==0.4.1", "sphinxext-opengraph": "sphinxext-opengraph==0.4.1",
"sphinx-intl": "sphinx-intl",
"starlette": "starlette", "starlette": "starlette",
"tensorflow-cpu": "tensorflow-cpu>=2.3", "tensorflow-cpu": "tensorflow-cpu>=2.3",
"tensorflow": "tensorflow>=2.3", "tensorflow": "tensorflow>=2.3",