feat(glossary): 实现 Rust Glossary V1

This commit is contained in:
2026-09-07 22:38:53 +08:00
parent 8fc93b8f39
commit 94483ff14d
42 changed files with 4543 additions and 92 deletions
+1
View File
@@ -10,6 +10,7 @@ contract fixture。JSON 由 Rust 代码路径产出后归一化,只替换本
- `resource.manifest` 第一页分页响应。
- 对应 release 的 `official-sync-snapshot.json`
- `launcher_metadata``game_main_config_bootstrap` 的 Go mirror 解码。
- Rust Glossary V1 query 响应,覆盖 alias、approved review、source provenance 和完整 history。
这些 fixture 只用于 schema / mirror 回归,不代表真实资源版本,也不替代 live
daemon socket 或完整发布切换验证。
+99
View File
@@ -0,0 +1,99 @@
{
"available": true,
"path": "${GLOSSARY_PATH}",
"source_text": "${SOURCE_TEXT}",
"terms": [
{
"term_id": "${TERM_ID}",
"source_term": "${SOURCE_TERM}",
"aliases": [
"${ALIAS}"
],
"recommended_translation": "${RECOMMENDED_TRANSLATION}",
"allowed_translations": [
"${ALLOWED_TRANSLATION}"
],
"source_language": "en",
"target_language": "zh-Hans",
"category": "character",
"priority": 10,
"scope": {
"destination": "${DESTINATION}"
},
"review_status": "approved",
"source": {
"source_kind": "manual",
"source_ref": "${SOURCE_REF}",
"source_author": "${SOURCE_AUTHOR}",
"source_note": "${SOURCE_NOTE}",
"observed_unix_seconds": 100
},
"history": [
{
"history_id": "${HISTORY_CREATED_ID}",
"action": "created",
"source": {
"source_kind": "manual",
"source_ref": "${SOURCE_REF}",
"source_author": "${SOURCE_AUTHOR}",
"source_note": "${SOURCE_NOTE}",
"observed_unix_seconds": 100
},
"review_status": "draft",
"snapshot": {
"source_term": "${SOURCE_TERM}",
"aliases": [
"${ALIAS}"
],
"recommended_translation": "${RECOMMENDED_TRANSLATION}",
"allowed_translations": [
"${ALLOWED_TRANSLATION}"
],
"source_language": "en",
"target_language": "zh-Hans",
"category": "character",
"priority": 10,
"scope": {
"destination": "${DESTINATION}"
}
},
"observed_unix_seconds": 100
},
{
"history_id": "${HISTORY_APPROVED_ID}",
"action": "approved",
"reviewer": "${REVIEWER}",
"reason": "reviewed",
"source": {
"source_kind": "manual",
"source_ref": "${SOURCE_REF}",
"source_author": "${SOURCE_AUTHOR}",
"source_note": "${SOURCE_NOTE}",
"observed_unix_seconds": 100
},
"review_status": "approved",
"snapshot": {
"source_term": "${SOURCE_TERM}",
"aliases": [
"${ALIAS}"
],
"recommended_translation": "${RECOMMENDED_TRANSLATION}",
"allowed_translations": [
"${ALLOWED_TRANSLATION}"
],
"source_language": "en",
"target_language": "zh-Hans",
"category": "character",
"priority": 10,
"scope": {
"destination": "${DESTINATION}"
}
},
"observed_unix_seconds": 101
}
],
"created_unix_seconds": 100,
"updated_unix_seconds": 101
}
]
}