Files
testing-tool/public
雨霖铃 aa23a263fe refactor: 迁移 i18n 系统从 react-i18next 到 chrome.i18n
- 移除 react-i18next、i18next 及相关依赖
- 删除旧的 i18n/ 目录和 useLazyTranslation 工具
- 新增 utils/chromeI18n.ts 类型安全 wrapper(useI18n Hook + getMessage)
- 生成 public/_locales/{zh,en}/messages.json(298 个翻译 key)
- 批量更新 39+ 组件文件的导入和翻译调用
- 转换翻译键格式:namespace:key → namespace_key
- 修复 ErrorBoundary/PageErrorBoundary 从 withTranslation HOC 改为直接调用 getMessage
- 更新 vitest.setup.ts mock 加载实际翻译文本
- 修复 11 个测试文件的断言以匹配中文翻译
- TypeScript、ESLint、547 项测试全部通过

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 19:21:54 +08:00
..

public/

静态资源目录,存放无需构建处理的文件,会被直接复制到输出目录。

文件说明

文件/目录 用途
icon/ 扩展图标,提供多种尺寸
icon/16.png 16×16 图标(工具栏)
icon/32.png 32×32 图标
icon/48.png 48×48 图标(扩展管理页)
icon/96.png 96×96 图标
icon/128.png 128×128 图标(Chrome Web Store
wxt.svg WXT 框架标志 SVG 图标

注意事项

  • 修改图标后需同步更新 wxt.config.ts 中的 manifest 配置
  • 图标格式推荐使用 PNG,确保透明背景