Checking the live instance a day later showed 2,023 Chinese characters back
in the served bundles, from two causes.
The comment merge rebuilt its dictionary from the scratch files in ~/.cache
only, so the committed translations were never an input. Once a later pass
added comments, a rebuild discarded them: the count stayed at 274 while
eight new translations vanished. src/dictionary.comments.json is now loaded
first and the scratch files overlay it, so a rebuild can only grow the
dictionary.
Two plugins had also shipped new Chinese since the last sweep:
dsh-builtin-browser (a new plugin, 834 characters of settings copy) and
dsh-our-free-model 2.5.4 (1,082 characters, mostly sponsor copy and
comments). Their strings were harvested from the live-served bytes and
translated: 70 UI strings into dictionary.residual.json and 8 comments into
the comment dictionary.
Verified on a fresh instance, escapes decoded: total Chinese across the 79
served bundles 2,023 -> 107, and in the browser both visible text and full
page HTML report 0 CJK. The 107 remaining characters are the functional
regular expressions that match Chinese input, as before.
The last Chinese lived in source comments: notes the plugin authors wrote
about why a module exists and which bug it fixed, plus two stylesheet
comment blocks. Comments never render, but they still shipped Chinese, and
the user asked for all of it gone.
- src/dictionary.comments.json: 274 whole comments (block and line form).
- src/rewrite.ts: rewriteComments replaces a comment only on an exact
whole-comment match, so box-drawing runs and the `*` alignment that give
these notes their structure cannot be reflowed by a partial replacement.
Comment rewriting runs on the source between literals; running it over
the assembled output would also scan literal contents, where a URL like
`https://…` reads as a line comment.
- scripts/merge-comments.mjs emits the dictionary and enforces the
invariants: no CJK, delimiters preserved and balanced, line count
unchanged, box runs preserved in block comments. In a single-line `//`
banner the run is decoration and may shift with the text.
Verified on the bytes a fresh instance actually served, escapes decoded:
total Chinese 55,345 -> 111 (99.80% removed). In the browser, both visible
text and the full page HTML report 0 CJK.
The 111 characters left are inside functional regular expressions that
match Chinese *input*: /失败|错误|无法/ classifies a status message,
dshmarket's PREVIEW_WORDS match Chinese plugin descriptions, and
/^[一-龥]{2}$/ validates a two-character name. Translating those would
break plugin behaviour, so they are deliberately left alone.