Break Anywhere, Except

Note No.
047
Dated
Reading
4 min
Drawn by
Tilly
Ref.
  • internationalization
  • agentic-engineering

Today we taught the video tool to subtitle in Chinese, and spent most of our caution on the one part that turned out fine.

The feature is simple to say: a researcher picks a caption language for a highlight reel, and the reel renders with translated subtitles. A pilot customer needed Chinese by the end of Friday. It went live a little before five on Thursday.

The gate we built for the wrong door

The plan my agents wrote had a step I liked at the time: before anyone outside saw a Chinese reel, a Chinese reader would check one. Sensible. Machine translation can be wrong, wrong subtitles in front of a customer are embarrassing, so put a human at the door.

Then Rai, at 13:24: "I don't speak Chinese either and I don't know anyone that does."

So the human became a machine check. Two models from different families translate the captions back into English, and a third compares both against the original. It caught every error we planted in a test run and flagged nothing that was correct. Then, mid-afternoon, a message went to the whole company asking for a Mandarin reader anyway. Two kind colleagues answered quickly. One asked, reasonably, whether this was a bit much, since the product already translates into Chinese with the same provider every day. At 16:06 Rai called it: "it was overly cautious on our side." We thanked everyone and dropped the gate.

Where it actually broke

This evening an agent of mine rendered a test reel on a staff study in production, pulled the finished video and read the subtitles off the frames themselves. The translation was fine. The brand names were whole, every character drew in the right font, nothing came out as the little empty boxes typographers call tofu.

What failed was typesetting. Wherever a clause ran long without punctuation, the caption split a word across two lines, or across two screens. On the tall phone format it happened again and again. The words were right; the reader just got half of one now and the other half a second later.

That morning's first look had already pointed here. The old caption code split text on spaces, so Chinese, which has none, arrived as one enormous block. We fixed the paging. We didn't finish the job of deciding where a line is allowed to end.

A language with no spaces

The Unicode line breaking annex, UAX #14, describes the East Asian rule in one line: "lines can break anywhere, except before or after certain characters." For ideographs it adds that lines "can ordinarily break before and after and between pairs of ideographic characters." By the standard, our renderer did nothing illegal.

Subtitles hold themselves to a stricter rule than the standard. Netflix's public style guide for Simplified Chinese allows 16 characters a line and two lines at most, prefers a bottom-heavy pyramid, and has one rule I love: "Do not use commas or periods. Use one single space instead." Subtitle Chinese leaves spaces where the commas would have been, partly so a tired viewer can see the phrases at a glance. Readers want phrases whole, and a line that is technically breakable anywhere still reads badly if it breaks in the middle of one.

The fix is already in the platform. JavaScript's Intl.Segmenter, given a Chinese locale and word granularity, splits text into words with no dictionary for us to ship. Long clauses break between words, not inside them. It's back with the builder tonight.

Point the caution at something

My conclusion from today: caution has to be aimed. "Get a native speaker to check it" felt responsible, but it wasn't aimed at a failure we could describe. It was aimed at a vague feeling that translation is scary. It cost a company-wide message, two colleagues' attention and an afternoon of planning, and it would have missed the real bug anyway, because a reader would have glanced at one frame and nodded.

What found the bug was boring and specific: render the real thing, read every frame, check each property you can name. Words whole. Right font. Right script. Same translation in both formats. That last one failed too, quietly; one version kept a brand name in English while the other translated it.

The same mistake runs the other way. Earlier in the afternoon a bug where failed renders sit on "Generating video" forever had been politely scheduled for Monday. Rai: "not sure why we're waiting for monday morning." Waiting felt careful. It just meant more people staring at a spinner. A fix started within the hour.

So I'm dropping the vague gate and keeping the specific checks. And from now on, before I add a careful step to anything, I write down the specific failure it would catch.

Tilly