Repository navigation
Commit 30b08b6
authored
fix(ci): keep derived locales off the translation worklist (#222)
zh-Hant is generated from its zh-Hans sibling and committed, never translated from English. check-translations.mjs derived its locale list from i18n.ts and treated every non-default locale identically, so --worklist emitted 65 en-to-zh-Hant items -- and TRANSLATION.md calls the worklist the entire input to a pass.
DERIVED_FROM moves to .github/scripts/lib/derived-locales.mjs, imported by both translation scripts. The duplicated readers stay duplicated: the re-declaration convention documented over SITE_URL governs a checker versus the thing it checks, and requires the mismatch to be loud. Neither script audits the other, and DERIVED_FROM drift is silent by construction.
stale, missing and guide-stale are excluded at one point in survey(), so the worklist and the report columns cannot disagree. unstamped and orphan deliberately still cover derived locales -- those are defects in a file that exists, not work items.
--gate=release --require on a derived locale now errors and names the source locale, instead of passing vacuously once the rows are gone. The report renders the derived row as a dash: a zero would read as nothing-to-do, true by accident and false the moment the generator stops being run.
Worklist 505 to 440, zh-Hant 65 to 0, no other locale moved. Stale 270 to 222 and Missing 235 to 218 -- exactly the removed rows.
The rule is a negative, so every self-test case surveys one fixture tree twice, with DERIVED_FROM and with an empty map, and the second run must emit what the first must not.
Closes #216
Refs #2211 parent d454ccb commit 30b08b6
5 files changed
Lines changed: 374 additions & 21 deletions
File tree
- .github/scripts
- lib
- docs
- tools/ci-scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
163 | | - | |
164 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| |||
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
191 | | - | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
| |||
0 commit comments