The publish date on the download page rendered Chinese on every locale,
so the English page read "Published on 3 个月前" and the Japanese page
"公開日 3 个月前".
Two causes:
1. date.ts called moment.locale('zh-cn', {...}) at module scope. Besides
registering the locale, that call also sets moment's global locale, so
merely importing the module pinned moment to Chinese before the
visitor's language was known.
2. Only `en` ships in moment's core, so zh-cn and ja must be imported
explicitly. Importing them alongside `import moment from 'moment'`
silently did nothing: the locale files are UMD and pull in their own
copy of moment, so the registrations landed on an instance this module
never read. Importing moment by path keeps both on one instance.
The 80-line hand-written locale config is dropped: it produced output
identical to moment's own zh-cn across every duration the page can
render, and it emitted a defineLocale deprecation warning.
formatDate now takes the locale explicitly, and ReleaseItem passes the
locale from useDownloadI18n through a computed so switching language
re-renders the date.
Verified in a browser against the production build: zh renders
"发布于 3 小时前", en "Published on 3 hours ago", ja "公開日 3時間前".
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>