Skip to content

Commit

Permalink
New translation batch for cn (github#28461)
Browse files Browse the repository at this point in the history
* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn

* run script/i18n/reset-known-broken-translation-files.js

* Check in cn CSV report

Co-authored-by: Grace Park <gracepark@github.com>
  • Loading branch information
docubot and gracepark authored Jun 13, 2022
1 parent beba513 commit f96284e
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 73 deletions.
1 change: 1 addition & 0 deletions translations/log/cn-resets.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-r
translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,Listed in localization-support#489
translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,broken liquid tags
translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,broken liquid tags
translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
translations/zh-CN/content/actions/managing-workflow-runs/removing-workflow-artifacts.md,broken liquid tags
translations/zh-CN/content/actions/managing-workflow-runs/reviewing-deployments.md,Listed in localization-support#489
translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md,broken liquid tags
Expand Down
2 changes: 1 addition & 1 deletion translations/zh-CN/content/actions/examples/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 示例
shortTitle: 示例
intro: 'Example workflows that demonstrate the CI/CD features of {% data variables.product.prodname_actions %}.'
intro: '演示 {% data variables.product.prodname_actions %} 的 CI/CD 功能的示例工作流程。'
versions:
fpt: '*'
ghes: '*'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ jobs:
</td>
<td>

This step uses the `actions/cache` action to cache the Next.js build, so that the workflow will attempt to retrieve a cache of the build, and not rebuild it from scratch every time. For more information, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)."
此步骤使用“actions/cache”操作来缓存 Next.js 构建,以便工作流程尝试检索构建的缓存,而不是每次都从头开始重新构建。 更多信息请参阅“[缓存依赖关系以加快工作流程](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)”。
</td>
</tr>
<tr>
Expand All @@ -631,7 +631,7 @@ This step uses the `actions/cache` action to cache the Next.js build, so that th
</td>
<td>

This step runs the build script.
此步骤运行构建脚本。
</td>
</tr>
<tr>
Expand All @@ -647,7 +647,7 @@ This step runs the build script.
</td>
<td>

This step runs the tests using `npm test`, and the test matrix provides a different value for {% raw %}`${{ matrix.test-group }}`{% endraw %} for each job in the matrix. It uses the `DIFF_FILE` environment variable to know which files have changed, and uses the `CHANGELOG_CACHE_FILE_PATH` environment variable for the changelog cache file.
此步骤使用“npm test”运行测试,并且测试矩阵为矩阵中的每个作业提供不同的 {% raw %}`${{ matrix.test-group }}`{% endraw %} 值。 它使用“DIFF_FILE”环境变量来了解哪些文件已更改,并将“CHANGELOG_CACHE_FILE_PATH”环境变量用于更改日志缓存文件。
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using scripts to test your code on a runner
shortTitle: Using scripts to test your code on a runner
intro: 'How to use essential {% data variables.product.prodname_actions %} features for continuous integration (CI).'
title: 使用脚本在运行器上测试代码
shortTitle: 使用脚本在运行器上测试代码
intro: '如何使用必要 {% data variables.product.prodname_actions %} 功能进行持续集成 (CI)'
versions:
fpt: '*'
ghes: '> 3.1'
Expand All @@ -23,7 +23,7 @@ topics:

## 示例概述

{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links.
{% data reusables.actions.example-workflow-intro-ci %} 此工作流程被触发时,它会自动运行一个脚本,用于检查 {% data variables.product.prodname_dotcom %} 文档网站是否有任何断开的链接。

{% data reusables.actions.example-diagram-intro %}

Expand All @@ -44,7 +44,7 @@ topics:
|在不同的运行器上运行作业,具体取决于存储库:| [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
{% data reusables.actions.checkout-action-table-entry %}
{% data reusables.actions.setup-node-table-entry %}
| Using a third-party action: | [`trilom/file-changes-action`](https://github.com/trilom/file-changes-action)| | Running a script on the runner: | Using `./script/rendered-content-link-checker.mjs` |
|使用第三方操作:| [`trilom/file-changes-action`](https://github.com/trilom/file-changes-action)| |在运行器上运行脚本:|使用 `./script/rendered-content-link-checker.mjs` |

## 示例工作流程

Expand Down Expand Up @@ -181,7 +181,7 @@ on:
</td>
<td>

Add the `workflow_dispatch` event if you want to be able to manually run this workflow from the UI. For more information, see [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch).
如果您希望能够从 UI 手动运行此工作流程,请添加“workflow_dispatch”事件。 更多信息请参阅 [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
</td>
</tr>
<tr>
Expand All @@ -195,7 +195,7 @@ Add the `workflow_dispatch` event if you want to be able to manually run this wo
</td>
<td>

Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch called `main`. 更多信息请参阅 [`push`](/actions/using-workflows/events-that-trigger-workflows#push)
添加 'push' 事件,以便每次将提交推送到分支 `main` 时,工作流程都会自动运行。 更多信息请参阅 [`push`](/actions/using-workflows/events-that-trigger-workflows#push)
</td>
</tr>
<tr>
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
</td>
<td>

Defines a job with the ID `check-links` that is stored within the `jobs` key.
定义 ID 为“check-links”的作业,该作业存储在“jobs”键中。
</td>
</tr>
<tr>
Expand All @@ -298,7 +298,7 @@ Defines a job with the ID `check-links` that is stored within the `jobs` key.
</td>
<td>

Groups together all the steps that will run as part of the `check-links` job. 工作流程中的每个作业都有自己的“steps”部分。
组合将作为“check-links”作业一部分运行的所有步骤。 工作流程中的每个作业都有自己的“steps”部分。
</td>
</tr>
<tr>
Expand Down Expand Up @@ -327,7 +327,7 @@ Groups together all the steps that will run as part of the `check-links` job.
</td>
<td>

This step uses the `actions/setup-node` action to install the specified version of the Node.js software package on the runner, which gives you access to the `npm` command.
此步骤使用“actions/setup-node”操作在运行器上安装指定版本的 Node.js 软件包,这使您可以访问“npm”命令。
</td>
</tr>

Expand All @@ -341,7 +341,7 @@ This step uses the `actions/setup-node` action to install the specified version
</td>
<td>

The `run` keyword tells the job to execute a command on the runner. In this case, `npm ci` is used to install the npm software packages for the project.
run”关键字指示作业在运行器上执行命令。 在这种情况下,“npm ci”用于为项目安装 npm 软件包。
</td>
</tr>

Expand All @@ -357,7 +357,7 @@ The `run` keyword tells the job to execute a command on the runner. In this case
</td>
<td>

Uses the `trilom/file-changes-action` action to gather all the changed files. 此示例使用 'a6ca26c14274c33b15e6499323aac178af06ad4b' SHA固定到操作的特定版本。
使用“trilom/file-changes-action”操作来收集所有已更改的文件。 此示例使用 'a6ca26c14274c33b15e6499323aac178af06ad4b' SHA固定到操作的特定版本。
</td>
</tr>

Expand All @@ -371,7 +371,7 @@ Uses the `trilom/file-changes-action` action to gather all the changed files.
</td>
<td>

Lists the contents of `files.json`. This will be visible in the workflow run's log, and can be useful for debugging.
列出“files.json”的内容。 这将在工作流程运行的日志中可见,并且对于调试非常有用。
</td>
</tr>
<tr>
Expand All @@ -391,7 +391,7 @@ Lists the contents of `files.json`. This will be visible in the workflow run's l
</td>
<td>

This step uses `run` command to execute a script that is stored in the repository at `script/rendered-content-link-checker.mjs` and passes all the parameters it needs to run.
此步骤使用“run”命令执行存储在存储库中的“script/rendered-content-link-checker.mjs”中的脚本,并传递运行所需的所有参数。
</td>
</tr>
<tr>
Expand All @@ -410,7 +410,7 @@ This step uses `run` command to execute a script that is stored in the repositor
</td>
<td>

This step also uses `run` command to execute a script that is stored in the repository at `script/rendered-content-link-checker.mjs` and passes a different set of parameters.
此步骤还使用“run”命令来执行存储在存储库中的“script/rendered-content-link-checker.mjs”中的脚本,并传递一组不同的参数。
</tr>

</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Using the GitHub CLI on a runner
shortTitle: Using the GitHub CLI on a runner
title: 在运行器上使用 GitHub CLI
shortTitle: 在运行器上使用 GitHub CLI
intro: '如何使用高级 {% data variables.product.prodname_actions %} 功能进行持续集成 (CI)。'
versions:
fpt: '*'
Expand All @@ -23,7 +23,7 @@ topics:

## 示例概述

{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links. If any broken links are found, the workflow uses the {% data variables.product.prodname_dotcom %} CLI to create a {% data variables.product.prodname_dotcom %} issue with the details.
{% data reusables.actions.example-workflow-intro-ci %} 此工作流程被触发时,它会自动运行一个脚本,用于检查 {% data variables.product.prodname_dotcom %} 文档网站是否有任何断开的链接。 如果发现任何断开的链接,工作流程将使用 {% data variables.product.prodname_dotcom %} CLI 创建包含详细信息的 {% data variables.product.prodname_dotcom %} 议题。

{% data reusables.actions.example-diagram-intro %}

Expand All @@ -42,7 +42,7 @@ topics:
{% data reusables.actions.secrets-table-entry %}
{% data reusables.actions.checkout-action-table-entry %}
{% data reusables.actions.setup-node-table-entry %}
| Using a third-party action: | [`peter-evans/create-issue-from-file`](https://github.com/peter-evans/create-issue-from-file)| | Running shell commands on the runner: | [`run`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) | | Running a script on the runner: | Using `script/check-english-links.js` | | Generating an output file: | Piping the output using the `>` operator | | Checking for existing issues using {% data variables.product.prodname_cli %}: | [`gh issue list`](https://cli.github.com/manual/gh_issue_list) | | Commenting on an issue using {% data variables.product.prodname_cli %}: | [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) |
| 使用第三方操作:| [`peter-evans/create-issue-from-file`](https://github.com/peter-evans/create-issue-from-file)| | 在运行器上运行 shell 命令:| [`run`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) | | 在运行器上运行脚本:| 使用 `script/check-english-links.js` | | 生成输出文件:| 使用 `>` 运算符传递输出 | | 使用 {% data variables.product.prodname_cli %} 检查现有议题:| [`gh issue list`](https://cli.github.com/manual/gh_issue_list) | | 使用 {% data variables.product.prodname_cli %} 评论议题:| [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) |

## 示例工作流程

Expand Down Expand Up @@ -213,10 +213,10 @@ on:
</td>
<td>

Defines the `workflow_dispatch` and `scheduled` as triggers for the workflow:
将“workflow_dispatch”和“scheduled”定义为工作流程的触发器:

* The `workflow_dispatch` lets you manually run this workflow from the UI. For more information, see [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch).
* The `schedule` event lets you use `cron` syntax to define a regular interval for automatically triggering the workflow. For more information, see [`schedule`](/actions/reference/events-that-trigger-workflows#schedule).
* workflow_dispatch”允许您从 UI 手动运行此工作流程。 更多信息请参阅 [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
* schedule”事件允许您使用“cron”语法来定义自动触发工作流程的定期间隔。 更多信息请参阅 [`schedule`](/actions/reference/events-that-trigger-workflows#schedule)
</td>
</tr>
<tr>
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
</td>
<td>

Defines a job with the ID `check_all_english_links`, and the name `Check all links`, that is stored within the `jobs` key.
定义 ID 为“check_all_english_links”和名称为“Check all links”的作业,该作业存储在“jobs”键中。
</td>
</tr>
<tr>
Expand All @@ -267,7 +267,7 @@ if: github.repository == 'github/docs-internal'
</td>
<td>

Only run the `check_all_english_links` job if the repository is named `docs-internal` and is within the `github` organization. Otherwise, the job is marked as _skipped_.
仅当存储库名为“docs-internal”并且位于“github”组织内时,才运行“check_all_english_links”作业。 否则,作业将标记为 _skiped_
</td>
</tr>
<tr>
Expand All @@ -279,7 +279,7 @@ runs-on: ubuntu-latest
</td>
<td>

配置作业在 Ubuntu Linux 运行器上运行。 This means that the job will execute on a fresh virtual machine hosted by {% data variables.product.prodname_dotcom %}. For syntax examples using other runners, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)."
配置作业在 Ubuntu Linux 运行器上运行。 这意味着作业将在由 {% data variables.product.prodname_dotcom %} 托管的新虚拟机上执行。 有关使用其他运行器的语法示例,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)”。
</td>
</tr>
<tr>
Expand All @@ -295,7 +295,7 @@ runs-on: ubuntu-latest
</td>
<td>

Creates custom environment variables, and redefines the built-in `GITHUB_TOKEN` variable to use a custom [secret](/actions/security-guides/encrypted-secrets). These variables will be referenced later in the workflow.
创建自定义环境变量,并重新定义内置的“GITHUB_TOKEN”变量以使用自定义 [secret](/actions/security-guides/encrypted-secrets)。 稍后将在工作流程中引用这些变量。
</td>
</tr>
<tr>
Expand All @@ -307,7 +307,7 @@ Creates custom environment variables, and redefines the built-in `GITHUB_TOKEN`
</td>
<td>

Groups together all the steps that will run as part of the `check_all_english_links` job. Each job in the workflow has its own `steps` section.
组合将作为“check_all_english_links”作业一部分运行的所有步骤。 工作流程中的每个作业都有自己的“steps”部分。
</td>
</tr>
<tr>
Expand Down Expand Up @@ -351,7 +351,7 @@ Groups together all the steps that will run as part of the `check_all_english_li
</td>
<td>

The `run` keyword tells the job to execute a command on the runner. In this case, the `npm ci` and `npm run build` commands are run as separate steps to install and build the Node.js application in the repository.
run”关键字指示作业在运行器上执行命令。 在这种情况下,“npm ci”和“npm run build”命令作为单独的步骤运行,以在存储库中安装和构建 Node.js 应用程序。
</td>
</tr>
<tr>
Expand All @@ -365,7 +365,7 @@ The `run` keyword tells the job to execute a command on the runner. In this case
</td>
<td>

This `run` command executes a script that is stored in the repository at `script/check-english-links.js`, and pipes the output to a file called `broken_links.md`.
此“run”命令执行存储在存储库中“script/check-english-links.js”的脚本,并将输出传递到名为“broken_links.md”的文件。
</td>
</tr>
<tr>
Expand All @@ -380,7 +380,7 @@ This `run` command executes a script that is stored in the repository at `script
</td>
<td>

If the `check-english-links.js` script detects broken links and returns a non-zero (failure) exit status, then use a [workflow command](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter) to set an output that has the value of the first line of the `broken_links.md` file (this is used the next step).
如果“check-english-links.js”脚本检测到断开的链接并返回非零(失败)退出状态,则使用 [工作流程命令](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter) 来设置具有 “broken_links.md” 文件第一行值的输出(这是在下一步中使用)。
</td>
</tr>
<tr>
Expand All @@ -402,7 +402,7 @@ If the `check-english-links.js` script detects broken links and returns a non-ze
</td>
<td>

Uses the `peter-evans/create-issue-from-file` action to create a new {% data variables.product.prodname_dotcom %} issue. This example is pinned to a specific version of the action, using the `b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e` SHA.
使用“peter-evans/create-issue-from-file”操作创建新的 {% data variables.product.prodname_dotcom %} 议题。 此示例使用 'b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e' SHA 固定到操作的特定版本。
</td>
</tr>
<tr>
Expand Down Expand Up @@ -430,9 +430,9 @@ Uses the `peter-evans/create-issue-from-file` action to create a new {% data var
</td>
<td>

Uses [`gh issue list`](https://cli.github.com/manual/gh_issue_list) to locate the previously created issue from earlier runs. This is [aliased](https://cli.github.com/manual/gh_alias_set) to `gh list-reports` for simpler processing in later steps. To get the issue URL, the `jq` expression processes the resulting JSON output.
使用 [`gh issue list`](https://cli.github.com/manual/gh_issue_list) 从早期运行中查找以前创建的议题。 这将[aliased](https://cli.github.com/manual/gh_alias_set) 为“gh list-reports”,以便在后续步骤中简化处理。 若要获取议题 URL,“jq”表达式将处理生成的 JSON 输出。

[`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) is then used to add a comment to the new issue that links to the previous one.
[`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) 然后用于向链接到上一个议题的新议题添加注释。
</td>
</tr>
<tr>
Expand All @@ -450,7 +450,7 @@ Uses [`gh issue list`](https://cli.github.com/manual/gh_issue_list) to locate th
</td>
<td>

If an issue from a previous run is open and assigned to someone, then use [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) to add a comment with a link to the new issue.
如果上一次运行中的议题已打开并分配给某人,请使用 [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) 添加带有指向新议题的链接的注释。
</td>
</tr>
<tr>
Expand All @@ -471,11 +471,11 @@ If an issue from a previous run is open and assigned to someone, then use [`gh i
</td>
<td>

If an issue from a previous run is open and is not assigned to anyone, then:
如果上一次运行中的议题已打开且未分配给任何人,则:

* Use [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) to add a comment with a link to the new issue.
* Use [`gh issue close`](https://cli.github.com/manual/gh_issue_close) to close the old issue.
* Use [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit) to edit the old issue to remove it from a specific {% data variables.product.prodname_dotcom %} project board.
* 使用 [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) 添加带有新议题链接的评论。
* 使用 [`gh issue close`](https://cli.github.com/manual/gh_issue_close) 关闭旧议题。
* 使用 [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit) 编辑旧议题,以将其从特定 {% data variables.product.prodname_dotcom %} 项目板中删除。
</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit f96284e

Please sign in to comment.