feat: localize Shopee GUI wording
This commit is contained in:
+19
@@ -1351,3 +1351,22 @@
|
||||
- 现象:T-540 代码和 `requirements-build.txt` 已固定 PyInstaller 6.11.1,构建脚本也会校验 `_internal/`,但 `docs/packaging.md`、`docs/03-tech-stack.md`、`docs/06-tasks.md`、`docs/current-state.md` 仍有当前 PyInstaller 5.13.2 扁平 onedir 的表述。
|
||||
- 文档:已把当前打包口径统一为 PyInstaller 6.11.1,产物必须包含 `cmshopee.exe` + `_internal/`;用户升级说明改为整体覆盖新版程序文件、`_internal/`、`version.txt`、`README.txt`,并保留旧目录 `data/`。
|
||||
- 边界:只修正文档一致性;历史 T-538 流水仍保留当时 PyInstaller 5 的记录;未改业务流程、DB、AI、Excel、CDP/Shopee 或用户数据路径。
|
||||
|
||||
## 【2026-07-07】T-542 文档 · GUI 用户可见 shopee/Shopee 改为蝦皮
|
||||
|
||||
- 需求:运行程序后 GUI 上不再显示 `shopee/Shopee` 英文平台名,用户可见文案统一使用「蝦皮」,例如「③ 更新蝦皮」「蝦皮更新安全」。
|
||||
- 文档:新增 `docs/06-tasks.md` T-542;同步 `docs/00-ai-start-here.md`、`docs/02-requirements.md`、`docs/04-architecture.md`、`docs/05-coding-rules.md`、`docs/routes.md`、`docs/api.md`、`docs/current-state.md` 与 `docs/ui/` 线框图。
|
||||
- 边界:本轮只更新文档,不改代码;内部标识符、配置键、URL、域名、CDP 选择器、文件名和第三方原始错误仍保留 `shopee/Shopee`。
|
||||
|
||||
## 【2026-07-07】T-542 完成 · GUI 用户可见 shopee/Shopee 改为蝦皮
|
||||
|
||||
- 代码:`app/gui/widgets.py` 将 Tab 标题改为「③ 更新蝦皮」;`app/gui/main_window.py` 同步 Tab 判断和 warning 图标索引;③更新、⑤设置、①采集、②生成和 GUI worker 的用户可见提示统一改为「蝦皮」;`app/editor.py` 中会冒到 GUI 的自定义错误改为「蝦皮 CDN / 蝦皮商品编辑器」。
|
||||
- 测试:`tests/test_gui.py` 同步新 Tab、设置分区和重置确认文案断言;旧用户文案验收搜索 `rg -n "更新shopee|Shopee 更新安全|更新 Shopee|未打开 Shopee|不回滚 Shopee" app tests` 已无命中。
|
||||
- 验证:`python -m compileall app main.py` 通过;`python -m unittest discover -s tests` 通过(221 tests)。
|
||||
- 边界:未改 `shopee_update`、`cmshopee`、域名、URL、CDP 选择器、JS 全局变量、DB/配置文件名等内部标识。
|
||||
|
||||
## 【2026-07-07】测试修正 · 避免根目录生成 db.sqlite
|
||||
|
||||
- 原因:`tests/test_gui.py` 中两个 `WriteBackWorker` 单测把 `db_path` 写成相对路径 `db.sqlite`;测试创建 run_log 时会打开 SQLite,导致在项目根目录生成一个空 `db.sqlite`。
|
||||
- 修复:这两个测试改为使用 `self.make_temp_dir()` 下的 `db.sqlite`,并断言临时目录被清理;根目录空 `db.sqlite` 已删除。
|
||||
- 验证:`python -m unittest discover -s tests -p test_gui.py` 通过(97 tests);`python -m unittest discover -s tests` 通过(221 tests),跑完后根目录没有 `db.sqlite`。
|
||||
|
||||
Reference in New Issue
Block a user