From 671ac4e835aa331e53fe30b775c2b910e9d90097 Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Thu, 4 Jul 2024 20:23:11 +0800 Subject: [PATCH] docs: add translation --- .github/workflows/sync-and-translate.yml | 8 +------- docs/conf.py | 9 ++++++++- docs/index.rst | 1 + docs/source/setup/translation.rst | 6 ++++++ 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 docs/source/setup/translation.rst diff --git a/.github/workflows/sync-and-translate.yml b/.github/workflows/sync-and-translate.yml index 027100d8e0..d7075076a6 100644 --- a/.github/workflows/sync-and-translate.yml +++ b/.github/workflows/sync-and-translate.yml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools polib==1.2.0 openai==v1.3.6 python-dotenv==1.0.0 pytest==8.2.2 sphinx-intl sphinx-book-theme==1.0.1 myst-parser sphinxcontrib-bibtex==2.5.0 autodocsumm sphinx-copybutton sphinx-icon sphinx_design sphinxemoji numpy matplotlib warp-lang gymnasium + pip install setuptools polib==1.2.0 openai==v1.3.6 python-dotenv==1.0.0 pytest==8.2.2 sphinx-intl sphinx-book-theme==1.0.1 myst-parser sphinxcontrib-bibtex==2.5.0 autodocsumm sphinx-copybutton sphinx-icon sphinx_design sphinxemoji numpy matplotlib warp-lang gymnasium sphinx-comments - name: Generate gettext run: | @@ -52,12 +52,6 @@ jobs: sphinx-intl update -p _build/gettext -l zh_CN popd - - name: show po and pot files - run: | - ls docs - ls docs/_build/gettext - ls docs/locale/zh_CN/LC_MESSAGES - - name: Translate using custom script run: | pushd docs diff --git a/docs/conf.py b/docs/conf.py index 4d89222552..cea371ab76 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,6 +54,7 @@ "sphinxcontrib.icon", "sphinx_copybutton", "sphinx_design", + "sphinx_comments", ] # mathjax hacks @@ -257,4 +258,10 @@ def setup(app): app.connect("autodoc-skip-member", skip_member) locale_dirs = ['locale/'] # path is example but recommended. -gettext_compact = False # optional. \ No newline at end of file +gettext_compact = False # optional. + +comments_config = { + "utterances": { + "repo": "fan-ziqi/IsaacLab", + } +} \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 96da4bdbce..fe8ef69ec9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -64,6 +64,7 @@ Table of Contents source/setup/sample source/setup/template source/setup/faq + source/setup/translation .. toctree:: :maxdepth: 2 diff --git a/docs/source/setup/translation.rst b/docs/source/setup/translation.rst new file mode 100644 index 0000000000..dc5473fe3d --- /dev/null +++ b/docs/source/setup/translation.rst @@ -0,0 +1,6 @@ +About Translation +========================= + +Translator: `fan-ziqi `__ + +Translation will be updated on `fan-ziqi/IsaacLab `__ \ No newline at end of file