From b06b019eacba131f5f50bac9664393985c99f2df Mon Sep 17 00:00:00 2001 From: chenxuuu Date: Sat, 4 Nov 2023 11:17:16 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E6=9C=89=E4=BA=9B=E4=B8=9C=E8=A5=BF?= =?UTF-8?q?=E8=A6=81=E5=8D=95=E7=8B=AC=E6=9B=BF=E6=8D=A2=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-page.yml | 2 +- translate-tool/translate-tool/Program.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-page.yml b/.github/workflows/update-page.yml index 71f616d2e..6456e1b33 100644 --- a/.github/workflows/update-page.yml +++ b/.github/workflows/update-page.yml @@ -31,7 +31,6 @@ jobs: rm -rf docs/ sphinx-build -b html translated-docs docs -E cd docs/ - echo "this is offline version, please visit wiki.luatos.com for latest version, document update on $(TZ=UTC-8 date +%Y-%m-%d,%H:%m:%S)" > "readme.txt" touch .nojekyll rm -rf .doctrees/ rm -rf _sources/ @@ -42,6 +41,7 @@ jobs: git config --global user.name "luatos_bot" git add . git commit -m "ci auto update docs" + continue-on-error: true - name: Push changes uses: ad-m/github-push-action@master with: diff --git a/translate-tool/translate-tool/Program.cs b/translate-tool/translate-tool/Program.cs index a24abcffe..a66f7ec31 100644 --- a/translate-tool/translate-tool/Program.cs +++ b/translate-tool/translate-tool/Program.cs @@ -50,6 +50,13 @@ static void Main(string[] args) var text = File.ReadAllText(file); text = text.Replace("wiki.luatos.com", "openluat.github.io/luatos-wiki-en"); text = text.Replace("https://github.com/openluat/luatos-wiki", "https://github.com/openluat/luatos-wiki-en"); + text = text.Replace("LuatOS团队", "LuatOS team"); + text = text.Replace("评论区仅用于讨论文档内容。如有使用问题或新需求,请进支持群讨论或在官方仓库新建issue", ""); + if (Path.GetFileName(file) == "conf.py") + { + text = text.Replace("language = 'zh_CN'", "language = 'en_US'"); + text = text.Replace("html_search_language = 'zh'", "html_search_language = 'en'"); + } //写入新文件 File.WriteAllText(newFile, text); }