Skip to content

Commit

Permalink
add: 有些东西要单独替换一下
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Nov 4, 2023
1 parent bd02599 commit b06b019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/update-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions translate-tool/translate-tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b06b019

Please sign in to comment.