From the round-2 review of #35 (mergeable, no P1/P2). English summary of the leftovers; the private lane report keeps the file:line receipts.
- Call-site guard has two blind spots (
chrome-copy.test.mjs, the fmtDate(...) regex stops at the first ) and splits on ,): a nested comma in the second argument, or an explicit undefined third argument, both pass the guard while no language is actually passed. All 12 current call sites are the plain fmtDate(x, dateFormat, meta.lang) shape, so this only affects future edits; tightening means requiring the third argument to match \blang\b.
- A consequence the PR text does not name: a single-language site that declares a non-CJK
lang but sets an explicit CJK format now gets the locale default (lang: en-US + cjk-md renders August 5, 2026 instead of 8月5日). This follows the ruling, so it is not a bug, but a live site with a template-default lang: en and CJK content would change on its next build; worth a note in the grammar text.
- The CJK gate reads the raw
lang while Intl reads toBcp47(lang), and the two disagree on rare spellings: ja_JP + cjk-full renders CJK but ja_JP with no format renders English; jpn/zho/yue are "not CJK" for the gate while Intl's default still renders 2024年7月13日. None of these throw or render blank; they are malformed inputs, recorded for completeness.
- A site with no
lang: but locales: starting with en-US still renders CJK dates by default — byte-identical to main and consistent with that page's existing <html lang="zh-Hant"> fallback, so not a regression of this PR. The real fix would infer a missing lang from locales[0], which also changes <html lang> and belongs to its own change.
None blocks a release.
From the round-2 review of #35 (mergeable, no P1/P2). English summary of the leftovers; the private lane report keeps the file:line receipts.
chrome-copy.test.mjs, thefmtDate(...)regex stops at the first)and splits on,): a nested comma in the second argument, or an explicitundefinedthird argument, both pass the guard while no language is actually passed. All 12 current call sites are the plainfmtDate(x, dateFormat, meta.lang)shape, so this only affects future edits; tightening means requiring the third argument to match\blang\b.langbut sets an explicit CJK format now gets the locale default (lang: en-US+cjk-mdrendersAugust 5, 2026instead of8月5日). This follows the ruling, so it is not a bug, but a live site with a template-defaultlang: enand CJK content would change on its next build; worth a note in the grammar text.langwhile Intl readstoBcp47(lang), and the two disagree on rare spellings:ja_JP+cjk-fullrenders CJK butja_JPwith no format renders English;jpn/zho/yueare "not CJK" for the gate while Intl's default still renders2024年7月13日. None of these throw or render blank; they are malformed inputs, recorded for completeness.lang:butlocales:starting withen-USstill renders CJK dates by default — byte-identical to main and consistent with that page's existing<html lang="zh-Hant">fallback, so not a regression of this PR. The real fix would infer a missinglangfromlocales[0], which also changes<html lang>and belongs to its own change.None blocks a release.