Remove the blank lines translate:sync-hash added to translated pages - #1361
Remove the blank lines translate:sync-hash added to translated pages#1361christian-byrne wants to merge 1 commit into
Conversation
Whitespace only: 538 files, 604 deletions, 0 insertions. No prose, frontmatter
key, hash or code block is touched.
$ git diff -U0 | grep -E '^[+-]' | grep -vE '^(\+\+\+|---)' | grep -v '^-$' | wc -l
0
Until the parent commit, syncChunkedHashes appended one blank line after the
closing --- on every run, so translated pages accumulated them. Attributed
against d56a77b^, the commit before the tool existed:
translated files with >=2 blank lines after frontmatter 542
grew since the tool landed 526
created after the tool landed 12
unchanged since before the tool existed (legitimate) 4
Each file is restored to the count it had at d56a77b^, or for the 12 created
later, to its English counterpart's count. The rule only ever removes lines, and
the 4 files that legitimately predate the tool (ja/installation/desktop/linux.mdx
and the three tutorials/partner-nodes/pricing.mdx translations) are left alone.
Worst case was 9 blank lines on zh/tutorials/video/minimax/minimax-h3.mdx.
Distribution of blank lines after frontmatter across translated pages:
before 0:31 1:3021 2:506 3:21 4:6 6:4 7:1 8:2 9:2
after 0:32 1:3561 2:4 6:3
This has to land after the fix, not before: run the old script once more and
every line comes straight back.
Refs #1358
|
Important Review skippedToo many files! This PR contains 538 files, which is 238 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (538)
You can disable this status message by setting the Comment |
|
@coderabbitai review |
|
Stacked on #1360 — review and merge that first. Follow-up to #1358.
Until #1360,
syncChunkedHashesappended one blank line after the closing---on every run, so translated pages accumulated them. This removes the ones already committed.Whitespace only
538 files, 604 deletions, 0 insertions. No prose, frontmatter key, hash or code block is touched, and the diff can be checked mechanically:
Every changed line is a removed empty line.
Which lines, and why they are safe to remove
Attributed against
d56a77bd^— the commit immediately before the tool existed — rather than guessed at:Growth pattern: 498 went 1 → 2, 18 went 1 → 3, 6 went 1 → 4, 3 went 2 → 3, 1 went 0 → 2. Worst case was 9 blank lines on
zh/tutorials/video/minimax/minimax-h3.mdx.The rule is: restore each file to the count it had at
d56a77bd^; for the 12 files created after that point, use their English counterpart's count. It can only ever remove lines, never add. The 4 files that legitimately had ≥2 blank lines before the tool existed —ja/installation/desktop/linux.mdxand the threetutorials/partner-nodes/pricing.mdxtranslations — are left untouched.Blank lines after frontmatter across translated pages:
Ordering
This must land after #1360, not before. Run the old script once more and every line comes straight back.
Not in scope
translate:sync-hash --dry-runstill reports 60 files with staletranslationSourceHashafter this lands. That is genuine drift — the English sources changed and the translations have not been revisited — and it is unchanged by this PR, which touches no hash. It needs a translator, not a whitespace pass.