Files
MemRelay/projects/49564d35-91ae-430d-9d67-7bb8bec4c646/curated/development/部署计划 – VMZhCN 本地化项目.md
T

96 lines
5.0 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 部署计划 – VMZhCN 本地化项目
type: curated
permalink: main/projects/49564d35-91ae-430d-9d67-7bb8bec4c646/curated/development/部署计划-vmzh-cn-本地化项目
stable_id: ea031222-b29f-4767-b63a-ea2bb64fe2a7
scope: project
project_id: 49564d35-91ae-430d-9d67-7bb8bec4c646
workspace_type: development
usage_profile_id: null
preference_context: development
document_type: deployment
revision: 1
source_memory_ids: []
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: 3e0661c1216b285a039518ba6d810b8394657e1d
source_git_commits:
- 3e0661c1216b285a039518ba6d810b8394657e1d
source_agent_sync_ids: []
model_connection: Sub2API
model_name: git-restore
source_count: 24
source_revisions: {}
source_dispositions:
processed: 24
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- git:data/linux-overrides-zh_CN.vmsg
- git:README.md
- git:tests/test_vmzhcn.py
- git:vmzhcn.py
job_cited_source_ids:
- git:data/linux-overrides-zh_CN.vmsg
- git:README.md
- git:tests/test_vmzhcn.py
- git:vmzhcn.py
conflicts: []
supersedes: []
preferences: []
source_cursor: 196
source_hash: 0a84505c3e53c83a1d2f2e939a42b813a45b865e71febe7c7d488f60c0578b9b
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: null
created_at: '2026-08-27T18:35:57.448609+00:00'
updated_at: '2026-09-23T14:54:09.631650+00:00'
tags:
- 部署
- 本地化
- VMware
- 中文
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
---
# 部署计划 – VMZhCN 本地化项目
## 目标概述
本项目面向 **VMware Workstation Pro 26H1** Linux 版,以简体中文(`zh_CN`)提供完整的 UI 本地化覆盖。部署的核心步骤包括:
1. **扫描现有二进制**,生成英文基准 `.vmsg`(`scan` 命令)。
2. **合并中文覆盖**(`linux‑overrides‑zh_CN.vmsg`)并执行占位符匹配验证(`build` 命令)。
3. **备份现有字典**,确保可回滚(`install` 前的备份策略)。
4. **安装新的中文字典** 到系统路径 `/usr/lib/vmware`(需要 `root` 权限)。
5. **切换用户语言**(`switch` 命令),写入 `~/.vmware/preferences` 并生成对应的桌面启动器。
6. **CI/CD 验证**:运行 7 项单元测试并确保翻译覆盖率 100%。
以上流程遵循 **KISS & YAGNI** 原则(`bf88c265-4749-4c50-85bc-4bae25298cd5`),不引入额外依赖,且 **AI‑驱动的自动 Git** 功能保持禁用(`3f91189b-11a1-45bb-8357-4f413dc1609d`)。
## 关键步骤细化
| 步骤 | 命令 | 说明 | 关键来源 |
|------|------|------|----------|
| **1. 扫描** | `python3 vmzhcn.py scan --output data/source/26H1-build-25388281-en.vmsg` | 从本机安装的 VMware 二进制抽取全部英文字符串。 | `git:vmzhcn.py`, `git:data/source/README.md` |
| **2. 构建** | `python3 vmzhcn.py build --base data/source/26H1-build-25388281-en.vmsg --override data/linux-overrides-zh_CN.vmsg --output zh_CN.vmsg` | 解析基准与覆盖文件,验证占位符匹配,合并后生成完整的中文字典。 | `git:tests/test_vmzhcn.py`, `git:vmzhcn.py` |
| **3. 备份** | 自动在 `/var/backups/vmzhcn/<timestamp>` 创建备份目录。若冲突则添加 `-1`, `-2` 后缀。 | 防止因意外覆盖导致本地化失效。 | `git:vmzhcn.py` |
| **4. 安装** | `sudo python3 vmzhcn.py install --dict zh_CN.vmsg` | 复制字典至 `/usr/lib/vmware` 并设置适当权限。 | `git:vmzhcn.py`, `5ed86f53-b53e-4534-8e51-d3a010069d5e` |
| **5. 切换语言** | `python3 vmzhcn.py switch zh_CN` | 更新用户偏好文件,生成 `vmzhcn-zh_CN.desktop`,提示用户重启 VMware。 | `git:vmzhcn.py`, `105b328f-4bda-4641-90a7-7282ef156316` |
| **6. CI 测试** | `pytest -q tests/` | 通过全部 7 项单元测试,确保无重复键、占位符匹配、正确的转义等。 | `git:tests/test_vmzhcn.py` |
## 部署前检查清单
- 已在 **Windows + WSL2 + Docker Desktop** 环境中配置 `python3 ≥3.9`(`f89fd472-41f6-4af1-9290-657982cabbbb`)。
- 确认 **Vaultwarden** 中存在唯一的 VMware 登录凭证(`105b328f-4bda-4641-90a7-7282ef156316`),如有则自动注入。
- 本地 `aidocs/` 目录不应被提交至 Git(`.gitignore` 已配置),除非用户明确要求(`1194be51-ee29-47e1-8957-ec2888007db6`)。
## 风险与缓解措施
- **占位符不匹配警告**:`validate_overrides` 只产生警告(`Unresolved / Open Issues`),如需强制阻止请在 CI 中将警告视为错误。**风险**:潜在的运行时格式错误。
- **硬编码英文 UI**:某些底层标签仍为英文(`1e49f29e-51cc-40fc-854b-09b5ac845b95`),此为已知局限,后续需通过二进制补丁或上游贡献解决。
- **AI/Git 自动化**:默认关闭,避免未经审查的自动提交(`3f91189b-11a1-45bb-8357-4f413dc1609d`)。
## 里程碑回顾(截至 2026‑08‑27)
- 🚀 **2026‑08‑26 22:10** 项目创建,首个 CLI `vmzhcn.py` 成形。
- ✅ **22:22** 完成 1 394 条 Linux‑specific 键的 100% 翻译。
- 📦 **22:27‑28** Gitea 仓库建立,首次提交推送完成。
> **注**:所有信息均基于已标记的证据来源,无外部推断。