This commit is contained in:
Alter-xyz
2025-07-18 21:30:33 +08:00
parent 73bdb1bb42
commit c25b6c7c8d
4 changed files with 30 additions and 14 deletions

View File

@@ -49,9 +49,11 @@ jobs:
echo "Files to translate:"
echo "${{ steps.changed-files.outputs.files }}"
for file in ${{ steps.changed-files.outputs.files }}; do
echo "Translating $file..."
python tools/translate/main.py "$file" "$DIFY_API_KEY"
echo "${{ steps.changed-files.outputs.files }}" | while IFS= read -r file; do
if [[ -n "$file" ]]; then
echo "Translating $file..."
python tools/translate/main.py "$file" "$DIFY_API_KEY"
fi
done
- name: Commit and push changes

View File

@@ -1,6 +0,0 @@
---
title: 测试
---
# 测试
你好,时间
这是一个测试文件。

View File

@@ -1,5 +0,0 @@
---
title: 测试文档 2
---
你好,世界!
这是一个测试文档 2

25
zh-hans/test3.mdx Normal file
View File

@@ -0,0 +1,25 @@
---
title: 测试文档
---
# 测试文档
这是一个测试文档,用于验证翻译功能。
---
对于文档撰写者:
GitHub Actions 仅用作观测进展. 实际操作是:
1. 写文档
2. push
3. 等待大约 0.5 - 1 分钟
4. pull request
1. 或者在 GitHub 网页上查看提交记录
没了
---
如果要更新术语表, 请更新 `tools/translate/termbase_i18n.md`
如果要调整翻译用的 prompt 或者更换基座模型, 访问我们的 Dify Studio 即可.