fix(i18n): add WeChat channel i18n support with weixin namespace#1891
fix(i18n): add WeChat channel i18n support with weixin namespace#1891piorpua merged 6 commits intoiOfficeAI:mainfrom
Conversation
Add 18 i18n keys for WeChat channel configuration UI to all 6 locales (en-US, zh-CN, ja-JP, zh-TW, ko-KR, tr-TR), following the same nested namespace pattern as the existing lark and dingtalk blocks.
… config Replace all Chinese fallback strings in WeixinConfigForm t() calls with English equivalents, and update test assertions to match. The i18n keys now resolve to proper translations at runtime via the weixin namespace.
…ions Apply oxfmt line-wrapping to long t() calls in WeixinConfigForm. Regenerate i18n-keys.d.ts with 18 new settings.weixin.* keys.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The main process build config suppresses Rollup EVAL warnings, but the
renderer config did not. This caused flaky build failures on CI
(macOS arm64) when eval('require')('crypto') in shared utils.ts was
bundled into the renderer.
Constraint: Must match the existing onwarn pattern in main config (L107-110)
Confidence: high
Scope-risk: narrow
…ypto
The uuid() function used eval('require')('crypto') to load Node.js crypto
without webpack bundling it. This triggered Rollup EVAL warnings in the
renderer build and caused flaky CI failures on macOS arm64.
globalThis.crypto is available in Node.js 19+ and all modern browsers,
so a single code path handles both environments without eval.
Rejected: Keep eval + suppress warning | eval in renderer bundle is unnecessary complexity
Rejected: Conditional import() | async import changes uuid() return type to Promise
Confidence: high
Scope-risk: narrow
Directive: Do not re-introduce eval or dynamic require in shared code — use globalThis.crypto
Add test for the !isGeminiAgent ternary that renders the auto-follow model label, fixing the partial coverage flagged by Codecov.
Code Review:fix(i18n): add WeChat channel i18n support with weixin namespace (#1891)变更概述本 PR 为微信 channel 补全了 i18n 支持:向全部 6 个 locale 的 方案评估结论:✅ 方案合理 i18n 补全完全遵循了项目现有的 问题清单🔵 LOW — EVAL 警告抑制原因不清晰文件: 问题代码: onwarn(warning, warn) {
if (warning.code === 'EVAL') return;
warn(warning);
},问题说明: 修复建议:若此 🔵 LOW — utils.ts patch 覆盖率不足文件: 问题说明:Codecov 报告显示本次改动的 patch 覆盖率为 50%, 修复建议:在
汇总
结论✅ 批准合并 — 无阻塞性问题,i18n 实现完整规范, 本报告由本地 CONCLUSION: APPROVED |
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
Summary
"weixin"i18n namespace (18 keys) to all 6 localesettings.jsonfiles (en-US, zh-CN, ja-JP, zh-TW, ko-KR, tr-TR), following the same pattern aslarkanddingtalkWeixinConfigForm.tsxwith English equivalentsCloses #1890
Test plan
bun run test— 13/13 WeChat config form tests passbunx tsc --noEmit— no type errorsbun run lint— 0 errorsbun run format— cleannode scripts/check-i18n.js— all locales complete, validation passesprek run --from-ref origin/main --to-ref HEAD— all CI checks pass