You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Teach the Translation Polisher to repair below-threshold grade rows, explicitly check learner-facing text for untranslated English, and manage a clean PR-body quality review block with status counts.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/workflows/translation-polisher.md
+39-19Lines changed: 39 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,14 +74,17 @@ If this workflow is triggered by `pull_request`, inspect the triggering pull req
74
74
75
75
Before editing, inspect the pull request's latest commit, current diff, labels, and body.
76
76
77
-
Stop with a no-op only if both of these are true:
77
+
Stop with a no-op only if all of these are true:
78
78
79
79
1. The translated Markdown already satisfies the quality checklist below and no file changes are needed.
80
-
2. The pull request body already contains an up-to-date `## Translation Quality Review` section with one grade row for every changed translated Markdown file.
80
+
2. The pull request body already contains an up-to-date managed `## Translation Quality Review` section with one grade row for every changed translated Markdown file.
81
+
3. Every existing grade in the managed review section is **A- or higher**.
81
82
82
83
If the latest commit appears to be from this Translation Polisher workflow but the pull request body is missing the `## Translation Quality Review` section, do not edit files. Still review and grade the changed translated Markdown files, update the pull request body, and add a concise comment if useful.
83
84
84
-
Do not add churn. If the translation is already good enough and the PR body already has current grades, leave it unchanged.
85
+
If the pull request body already contains a managed `## Translation Quality Review` section and any row is graded **B+ or lower**, treat those files as required repair targets. Review and polish those files again before deciding whether to push changes or leave a blocking comment.
86
+
87
+
Do not add churn. If the translation is already good enough and the PR body already has current A- or higher grades, leave it unchanged.
85
88
86
89
## Files you may change
87
90
@@ -104,22 +107,27 @@ Do not edit:
104
107
- Example: compare `translations/es/README.md` with `README.md`.
105
108
- Example: compare `translations/es/03-development-workflows/README.md` with `03-development-workflows/README.md`.
106
109
3. Focus on files changed by the pull request, not every translated file in the repository.
107
-
4. Preserve Markdown structure exactly unless a link or heading fix is required.
108
-
5. Apply the shared quality rules and the language quality profile for each target language present in the pull request.
109
-
6. Run the deterministic cleanup script after edits:
110
+
4. If the pull request body already has a managed `## Translation Quality Review` section, identify files with grades below A- and repair those files first.
111
+
5. Preserve Markdown structure exactly unless a link or heading fix is required.
112
+
6. Apply the shared quality rules and the language quality profile for each target language present in the pull request.
113
+
7. Run an untranslated learner-facing text pass:
114
+
- Check headings, visible table headers, navigation tables, list labels, callout/admonition labels, and human-facing link labels.
115
+
- Translate leftover English when it is learner-facing prose.
116
+
- Preserve product names, commands, file paths, branch names, package names, URLs, badge URLs, code identifiers, and GitHub UI labels that learners must recognize.
117
+
8. Run the deterministic cleanup script after edits:
7. Perform a final review of each changed target-language file against its English source file. Grade each file using A, A-, B+, B, B-, C, D, or F.
116
-
8. Continue improving the translation until every changed target-language file earns **A- or higher**.
117
-
9. If any changed target-language file remains below A- after reasonable polishing, do not push changes and do not add the `translation-polished` label. Add a pull request comment explaining the blocking issues and the current file grades.
118
-
10. Review your final diff. If it contains anything outside `translations/**/*.md`, revert those changes.
119
-
11. Push your changes to the target pull request branch using the safe output only when every changed target-language file is A- or higher.
120
-
12. Update the pull request body with a final per-file grade table using the instructions in **Pull request body update**.
121
-
13. Add the `translation-polished` label only when every changed target-language file is A- or higher.
122
-
14. Add a short pull request comment summarizing what was polished, which languages were touched, and the final grade range.
123
+
9. Perform a final review of each changed target-language file against its English source file. Grade each file using A, A-, B+, B, B-, C, D, or F.
124
+
10. Continue improving the translation until every changed target-language file earns **A- or higher**.
125
+
11. If any changed target-language file remains below A- after reasonable polishing, do not push changes and do not add the `translation-polished` label. Update the pull request body with `Translation status: Needs polish` and add a pull request comment explaining the blocking issues and current file grades.
126
+
12. Review your final diff. If it contains anything outside `translations/**/*.md`, revert those changes.
127
+
13. Push your changes to the target pull request branch using the safe output only when every changed target-language file is A- or higher.
128
+
14. Update the pull request body with a final per-file grade table using the instructions in **Pull request body update**.
129
+
15. Add the `translation-polished` label only when every changed target-language file is A- or higher.
130
+
16. Add a short pull request comment summarizing what was polished, which languages were touched, and the final grade range.
123
131
124
132
## Quality checklist
125
133
@@ -130,7 +138,7 @@ For every translated Markdown file you edit:
130
138
- Preserve Markdown tables, lists, blockquotes, headings, and admonitions.
131
139
- Preserve links and image destinations. Translate only the human-facing link label when appropriate.
132
140
- Translate human-facing prose naturally for the target language.
133
-
- Translate visible table headings and list labels when they are human-facing content.
141
+
- Translate visible headings, table headings, navigation labels, list labels, callout labels, and link labels when they are human-facing content.
134
142
- Keep the beginner-friendly tone of the English source.
135
143
- Avoid literal phrasing that sounds unnatural in the target language.
136
144
- Do not remove the Co-op Translator disclaimer.
@@ -199,29 +207,41 @@ Apply the profile only when that language is present in the pull request.
199
207
200
208
## Pull request body update
201
209
202
-
After the final review, update the pull request body with a managed translation-quality section.
210
+
After the final review, update the pull request body with a managed translation-quality section. Replace only the managed block between these markers:
211
+
212
+
```markdown
213
+
<!-- translation-quality-review:start -->
214
+
<!-- translation-quality-review:end -->
215
+
```
203
216
204
-
The body must include exactly one section with this heading:
217
+
The body must include exactly one managed block and exactly one section inside that block with this heading:
205
218
206
219
```markdown
207
220
## Translation Quality Review
208
221
```
209
222
210
-
If the section already exists, replace the entire existing section with the new one. Do not append duplicates.
223
+
If an older unmarked `## Translation Quality Review`section already exists, replace it with the marked block. Do not append duplicates. Do not place generated workflow footers, integrity notes, or unrelated comments inside the managed block.
| es |`translations/es/README.md`| A- | Preserves structure and reads naturally after polish. |
220
237
221
238
All changed translated Markdown files must be graded **A- or higher** before this PR is marked `translation-polished`.
239
+
<!-- translation-quality-review:end -->
222
240
```
223
241
224
-
Include one row for every changed translated Markdown file in the target pull request. Keep notes concise and specific.
242
+
Use `Translation status: Accepted` only when every changed translated Markdown file is graded A- or higher. Otherwise use `Translation status: Needs polish`, include counts for total files, accepted files, and files that need polish, and keep the `translation-polished` label off the PR.
243
+
244
+
Include one row for every changed translated Markdown file in the target pull request. Keep notes concise and specific. For below-threshold files, the note must state the highest-impact issue to fix.
0 commit comments