◉ANTIGRAVITY LABJP
Articles/Editor View
⟐ Editor View/2026-09-10Intermediate

The File Counts Matched. 148 Pairs Disagreed on Code Blocks

My Japanese and English article trees matched at 1,057 files each, yet the bodies had quietly diverged. Here is what counting code blocks and H2 headings across every pair turned up, why a character-length ratio failed to catch any of it, and the 40-line checker I now run before every push.

i18n5quality gate3MarkdownAntigravity399repository ops

✦ Premium Article

The message arrived one morning as a single line from a reader: the steps in the English version had no code in them.

I opened the Japanese page. Twenty-five code blocks. I opened the English one. None.

The counts had always matched. 1,057 files on the Japanese side, 1,057 on the English side. That number is what I check before every push, because a missing counterpart turns the language switcher into a 404, and I had put a guard there long ago.

The guard was counting files. What matched was the number of documents, not the number of things inside them.

Reviewing 1,057 pairs by eye was not going to happen. So I counted the things that should not change when a document is translated. What follows is that record.

I counted the contents, not the files

I limited the count to things whose quantity should survive translation: fenced code blocks, H2 headings, HTML tables, in-article links, and a few frontmatter keys. I did not compare prose. Translated prose is supposed to look different.

What I countedPairs that disagreedShare of 1,057 pairs
Missing English counterpart00%
Frontmatter premium10.1%
Frontmatter level10.1%
Number of tags121.1%
Frontmatter date161.5%
HTML tables181.7%
In-article links302.8%
Code blocks14814.0%
H2 headings19618.5%

Forty-nine pairs contain no code at all, so among the 1,008 pairs that do, the code-block mismatch rate is 14.7%. One in seven.

The gap between the top rows and the bottom rows is what stopped me. The two fields I had been guarding — premium and level — disagreed in 2 pairs out of 1,057. The body, where no guard existed, disagreed in 196.

A check watches the place it was pointed at. Everywhere else stays invisible, including the fact that it is invisible.

Four pairs where the English side had no code at all

I sorted by severity first. These are the pairs where the Japanese version has code blocks and the English version has zero.

Code blocks, JapaneseEnglishBody length (JA to EN)
25010,708 to 6,944
2307,980 to 5,025
16014,772 to 2,926
102,592 to 4,912

For anyone who came for the steps, the first three are simply not usable. The fourth is the odd one: the English body is longer than the Japanese, and the code still went missing.

One more pair had dropped from 22 blocks to 3. Because it is not zero, it looks healthy in any listing. Half-empty pages like that survive the longest.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You will be able to set a parity rule for your own bilingual repo based on measured structure counts rather than on file counts that always look green
✦You will know why a character-length ratio cannot guard a Japanese/English pair before you spend a week drowning in warnings from it
✦You will have a way to sort 148 mismatches into the handful that actually hurt readers and the rest that can wait
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Editor View2026-10-21
I Wondered Whether to Sort My Diffs by Machine, So I Ran It on 106 Commits. It Mattered for 8, and for One 1,776-File Change
I wrote a small script that orders a git diff by reading priority and ran it on 106 recent commits. It earned its place in 8 of them and one bulk change. Rules, full code, and the silent misclassification traps.
⟐ Editor View2026-10-20
Right-Click Shows Nothing in the Desktop App: Getting Copy and Paste Back, in the Order I'd Try Things
Some Windows users report that right-clicking in the Antigravity desktop app opens no menu, so cut, copy and paste vanish. This note sorts the reports from versions 2.12.2 and 2.13.0, keyboard fallbacks to try first, how to tell whether the problem is the app or Windows, and what to write when you report it.
⟐ Editor View2026-10-16
An Update Notice the Night Before a Deadline: Three Questions I Ask Before Clicking
When an Antigravity update notice appears the night before a deadline, should you update or wait? How I read the changelog, check that I can roll back, and set up a five-minute safety net.