mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 07:24:55 +08:00
feat(patch):统一清单驱动汉化发布
This commit is contained in:
@@ -89,8 +89,8 @@ git check-ignore -v Cargo.lock CLAUDE.md AGENTS.md CONTRIBUTING.md
|
||||
当前开发优先推进:
|
||||
|
||||
1. 继续 AssetBundle 复杂对象解析、真实 fixture 和发布级重打包。
|
||||
2. 基于 `translation.worker.run` 继续扩展 TM/Glossary,并推进通用 manifest Patch 构建。
|
||||
3. 扩展 ResourceRepository 查询面:更丰富的 TextUnit/TM 查询和通用 Patch 发布所需资源视图。
|
||||
2. 基于 `translation.worker.run` 继续扩展 TM/Glossary,并补充复杂 AssetBundle 的真实 fixture 与发布验证。
|
||||
3. 扩展 ResourceRepository 查询面:更丰富的 TextUnit/TM 查询和 generic manifest 发布所需资源视图。
|
||||
4. 按 `docs/guides/official-full-pull-smoke.md` 在隔离目录执行真实官方网络全量下载 smoke,并保留运行报告。
|
||||
5. 在资源和翻译契约稳定后推进完整 Web 协作后台和完整游戏业务 API。
|
||||
|
||||
|
||||
@@ -336,7 +336,8 @@ source text、destination 和 archive entry 后再落库。blocking Glossary QA
|
||||
## localized patch 发布与回滚
|
||||
|
||||
`i18n publish` 会在独立的 `.staging/<localized-release-id>` 中复制当前官方
|
||||
release,校验工作台与当前 TextUnit 索引的 source/location 一致后,写入已有支持
|
||||
release,校验工作台或 generic patch manifest 与当前官方 release 的 source identity
|
||||
一致后,按确定的 operation sequence 写入 Binary、JSON、UTF-8 Text,以及已有支持
|
||||
范围内的 TextAsset、TypeTree string field 和 managed-reference string field
|
||||
patch。校验通过后才原子切换 `localized/current`,并在 release manifest 中记录
|
||||
源/目标 BLAKE3、字节数、patch kind、TextUnit、provider、review、发布时重新计算的
|
||||
@@ -359,6 +360,21 @@ bat i18n publish \
|
||||
--localized-release-id release-worker-1
|
||||
```
|
||||
|
||||
已有 generic manifest 时直接发布:
|
||||
|
||||
```bash
|
||||
bat i18n publish \
|
||||
--patch-manifest /tmp/bat-patch-manifest.json \
|
||||
--localized-release-id localized-v1
|
||||
```
|
||||
|
||||
manifest 必须声明当前官方 `source_version` 和目标 localized `target_version`,
|
||||
文件 hash/size、操作顺序和算法载荷;直接文件支持 Binary/JSON/Text,UnityFS 操作
|
||||
必须保留 serialized file、path ID、field path 或 TextAsset 定位,ZIP 内 UnityFS
|
||||
还必须保留 `archive_entry`。Rust 会在 staging 中逐操作验证 source precondition、
|
||||
最终 hash/size,并在 ZIP 外层重写后重新读取条目、重解析 UnityFS 和校验实际替换值。
|
||||
其他未支持的 UnityFS 结构仍明确拒绝。
|
||||
|
||||
发布失败会清理 staging,不切换 `current`。当前 release 的 rollback 目标由
|
||||
manifest 记录,执行后删除本次版本目录并恢复上一版本;没有上一版本时移除
|
||||
`current`:
|
||||
@@ -370,7 +386,7 @@ bat i18n rollback --localized-release-id release-worker-1
|
||||
Rust RPC 方法为 `localized.publish` 和 `localized.rollback`;bat-api 对应为
|
||||
`POST /admin/control/localized-publish`、`POST /admin/control/localized-rollback`
|
||||
以及鉴权的 `GET /admin/translation/status`。发布请求必须且只能包含
|
||||
`translation_file` 或 `from_worker=true`;rollback 可省略 release ID 以操作当前
|
||||
`translation_file`、`from_worker=true` 或 `patch_manifest`;rollback 可省略 release ID 以操作当前
|
||||
release。Go 只做鉴权、参数校验和转发,状态与产物仍由 Rust 持有。
|
||||
|
||||
## 边界
|
||||
|
||||
Reference in New Issue
Block a user