docs: 同步 i18n 移除与存储初始化防覆盖说明
- 移除已废弃的 chrome.i18n / _locales 文档引用 - 补充 UI 文案规范(features.tsx + 组件内中文) - 记录 RouterProvider / useStorageState 初始化防覆盖机制 - 更新 syncSnapshot、themeSnapshot、restrictedUrls 工具说明 Co-authored-by: LingandRX <LingandRX@users.noreply.github.com>
This commit is contained in:
+1
-16
@@ -12,24 +12,9 @@
|
||||
| `icon/48.png` | 48×48 图标(扩展管理页) |
|
||||
| `icon/96.png` | 96×96 图标 |
|
||||
| `icon/128.png` | 128×128 图标(Chrome Web Store) |
|
||||
| `_locales/` | Chrome 扩展本地化资源 |
|
||||
|
||||
## 本地化资源
|
||||
|
||||
项目使用 Chrome 扩展标准 `chrome.i18n`,默认语言在 `wxt.config.ts` 中配置为 `zh_CN`。
|
||||
|
||||
| 文件/目录 | 用途 |
|
||||
| ------------------------------ | -------------------------------------------------- |
|
||||
| `_locales/zh_CN/messages.json` | 默认中文语言包,包含功能名、描述、按钮、提示等翻译 |
|
||||
|
||||
添加或修改文案时:
|
||||
|
||||
- 使用 Chrome 扩展消息格式:`"key": { "message": "文本" }`
|
||||
- key 使用下划线分隔,例如 `testDataGenerator_title`
|
||||
- 代码中通过 `useI18n` 或 `getMessage` 读取,不要新增 `i18n/locales` 目录
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 修改图标后需同步更新 `wxt.config.ts` 中的 manifest 配置
|
||||
- 图标格式推荐使用 PNG,确保透明背景
|
||||
- 修改 `_locales` 后需确认 `manifest.default_locale` 与语言目录名一致
|
||||
- UI 文案不在此目录维护,见 `src/config/features.tsx` 与各页面组件
|
||||
|
||||
Reference in New Issue
Block a user