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
Copy file name to clipboardExpand all lines: .github/skills/localizations/SKILL.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,10 +77,14 @@ Regardless of locale, the following must be preserved exactly and **not** transl
77
77
78
78
- YAML frontmatter **keys** (translate values only where appropriate, e.g. a `title`).
79
79
- Fenced and inline code, including variable, function, and command names.
80
-
- URLs, link targets, image paths, and heading anchors/slugs.
80
+
- URLsand external link targets.
81
81
- HTML tags, Markdown structure, tables, and admonition markers.
82
82
83
-
Translate human-language prose, including comments inside code blocks where they are explanatory (per the locale rules). Keep heading structure and ordering stable so links and anchors continue to resolve.
83
+
Translate human-language prose, including comments inside code blocks where they are explanatory (per the locale rules). Keep heading order and document structure stable.
84
+
85
+
**Heading anchors follow the localized text.** When a heading is translated, its auto-generated anchor/slug changes with it—this is expected. The requirement is that **same-document anchor links keep resolving**: whenever you translate a heading, update every in-page link that targets it (`](#...)`) to the localized heading's new slug. Do not leave a link pointing at the original English slug once the heading is translated, and do not preserve an English anchor that no longer matches its heading. Anchors that point into **non-localized** files (or external URLs) keep their original target.
86
+
87
+
**Image and asset paths point to the original assets unless a localized asset exists.** Because localized files live under `translations/<locale>/`, a source-relative path such as `images/x.png` must be rewritten so it still resolves to the original asset (e.g. `../../../<chapter>/images/x.png`). Only point at a localized asset when a corresponding translated image actually exists under the locale tree. Either way, the link must resolve to a real file.
84
88
85
89
### Translator agent
86
90
@@ -95,7 +99,9 @@ The evaluator scores the localized document against the locale's **Evaluator Sco
95
99
## DOs and DON'Ts
96
100
97
101
-**Do** perform localization only for the target locales defined in the `rules` directory (one `<locale>.md` per supported locale). Do not localize into unsupported locales.
98
-
-**Do** preserve Markdown structure, code, links, image paths, heading anchors, and frontmatter keys exactly (see *Markdown and formatting preservation*).
102
+
-**Do** preserve Markdown structure, code, external link/URL targets, and frontmatter keys exactly (see *Markdown and formatting preservation*).
103
+
-**Do** let heading anchors follow the localized heading text, and update same-document anchor links to match the new slugs so they keep resolving (see *Markdown and formatting preservation*).
104
+
-**Do** point image and asset paths at the original assets (rewriting the relative path as needed so it resolves from `translations/<locale>/`), unless a corresponding localized asset exists (see *Markdown and formatting preservation*).
99
105
-**Do** mirror the source directory layout under `translations/<locale>/`.
100
106
-**Don't** treat files under `translations/` as source input.
101
107
-**Don't** reorder or restructure content; keep headings and their order stable.
| 1 |**Accuracy (정확성)**| Meaning matches the source exactly; every number, name, and fact is preserved; nothing is added, distorted, or omitted. |**Any** mistranslation, negation flip, fabricated/dropped fact, or altered number/name — even a single isolated one. |
103
-
| 2 |**Markdown & Structural Integrity**| Frontmatter keys, Markdown structure, tables, URLs, link targets, image paths, and heading anchors/slugs are preserved exactly; heading order is stable. |**Any** broken link, altered anchor, translated frontmatter key, or corrupted Markdown/table. |
103
+
| 2 |**Markdown & Structural Integrity**| Frontmatter keys, Markdown structure, tables, and external URLs are preserved exactly; heading order is stable. Heading anchors follow the localized headings, and every same-document anchor link resolves to its (now-localized) target. Image/asset paths resolve to a real asset—the original asset (relative path rewritten as needed) unless a localized asset exists. |**Any** broken link (including a same-document anchor that points at the original English slug after its heading was translated), unresolved image path, translated frontmatter key, or corrupted Markdown/table. |
0 commit comments