This commit is contained in:
parent
dea3e9d22f
commit
008dd116bf
6
.github/workflows/翻译更新日志 copy.yml
vendored
6
.github/workflows/翻译更新日志 copy.yml
vendored
@ -82,9 +82,9 @@ jobs:
|
||||
# 4. 创建中英文对照的更新日志,使用markdown格式的表格展示
|
||||
- name: 生成中英文对照的更新日志
|
||||
run: |
|
||||
# 处理英文原文和中文翻译中的换行符为 `<br>`
|
||||
ENGLISH_TEXT=$(echo "${{ steps.fetch_commits.outputs.messages }}" | sed ':a;N;$!ba;s/\n/<br>/g')
|
||||
CHINESE_TEXT=$(echo "${{ steps.translate.outputs.translated_text }}" | sed ':a;N;$!ba;s/\n/<br>/g')
|
||||
# 使用三个反引号包围英文和中文内容
|
||||
ENGLISH_TEXT="\`\`\`\n${{ steps.fetch_commits.outputs.messages }}\n\`\`\`"
|
||||
CHINESE_TEXT="\`\`\`\n${{ steps.translate.outputs.translated_text }}\n\`\`\`"
|
||||
|
||||
# 创建 Markdown 表格
|
||||
echo "| 英文原文 | 中文翻译 |" > ./更新日志对照表格.md
|
||||
|
Loading…
Reference in New Issue
Block a user