diff --git a/crates/workshop-rs/src/catalog/data/catalog.json b/crates/workshop-rs/src/catalog/data/catalog.json index fae82ec5..ea8749f3 100644 --- a/crates/workshop-rs/src/catalog/data/catalog.json +++ b/crates/workshop-rs/src/catalog/data/catalog.json @@ -3945,7 +3945,10 @@ "ru-RU": "Break", "th-TH": "Break", "tr-TR": "Kesme", - "zh-CN": "跳出循环", + "zh-CN": [ + "中断", + "跳出循环" + ], "zh-TW": "Break" }, "id": "break", @@ -6424,10 +6427,7 @@ "ru-RU": "Abort", "th-TH": "ยกเลิก", "tr-TR": "Yarıda Kes", - "zh-CN": [ - "中止", - "中断" - ], + "zh-CN": "中止", "zh-TW": "Abort" }, "id": "abort", @@ -7995,7 +7995,7 @@ ] } ], - "digest": "2d98f50b523e38bfbff59a952c0e4c3c80e8c7f972bb9b30a81fdabc0c46de19", + "digest": "3283113d49f3ff8f294b092c0a15e2bcef9e14805ed28fac71baf803e804014f", "enums": [ { "domain": "Impulse", @@ -22272,8 +22272,7 @@ }, { "aliases": { - "en-US": "Is Firing Secondary Fire", - "zh-CN": "正在使用辅助武器" + "en-US": "Is Firing Secondary Fire" }, "id": "isFiringSecondaryFire", "paramNames": [ @@ -23080,7 +23079,10 @@ "ru-RU": "Is Firing Secondary", "th-TH": "Is Firing Secondary", "tr-TR": "İkincil Saldırıyı Kullanıyor", - "zh-CN": "正在发射辅助攻击", + "zh-CN": [ + "正在使用辅助武器", + "正在发射辅助攻击" + ], "zh-TW": "Is Firing Secondary" }, "id": "isFiringSecondary", diff --git a/crates/workshop-rs/tests/catalog.rs b/crates/workshop-rs/tests/catalog.rs index 32d6fcda..7529faaf 100644 --- a/crates/workshop-rs/tests/catalog.rs +++ b/crates/workshop-rs/tests/catalog.rs @@ -111,24 +111,32 @@ fn localized_string_presets_resolve_and_translate_by_identity() { } #[test] -fn reviewed_locale_alias_conflicts_resolve_to_one_canonical_identity() { +fn zh_cn_break_and_abort_spellings_stay_distinct() { let catalog = builtin(); - for spelling in ["中止", "中断"] { + let zh = Locale::new("zh-CN"); + for (spelling, id) in [("中断", "break"), ("跳出循环", "break"), ("中止", "abort")] { let entry = catalog - .resolve(Kind::Action, &Locale::new("zh-CN"), spelling) - .expect("reviewed alias resolves"); - assert_eq!(entry.id, "abort"); + .resolve(Kind::Action, &zh, spelling) + .expect("reviewed spelling resolves"); + assert_eq!(entry.id, id, "{spelling}"); + } + assert_eq!(catalog.spelling(Kind::Action, &zh, "break"), Some("中断")); + assert_eq!(catalog.spelling(Kind::Action, &zh, "abort"), Some("中止")); +} + +#[test] +fn zh_cn_is_firing_secondary_uses_the_pinned_overpy_spelling() { + let catalog = builtin(); + let zh = Locale::new("zh-CN"); + for spelling in ["正在使用辅助武器", "正在发射辅助攻击"] { + let entry = catalog + .resolve(Kind::Value, &zh, spelling) + .expect("reviewed spelling resolves"); + assert_eq!(entry.id, "isFiringSecondary", "{spelling}"); } assert_eq!( - catalog.spelling(Kind::Action, &Locale::new("zh-CN"), "abort"), - Some("中止") - ); - assert_eq!( - catalog - .entry(Kind::Action, "abort") - .expect("abort entry") - .spellings(&Locale::new("zh-CN")), - &["中止".to_string(), "中断".to_string()] + catalog.spelling(Kind::Value, &zh, "isFiringSecondary"), + Some("正在使用辅助武器") ); } diff --git a/crates/workshop-rs/tests/identity.rs b/crates/workshop-rs/tests/identity.rs index f799c903..3221e9d8 100644 --- a/crates/workshop-rs/tests/identity.rs +++ b/crates/workshop-rs/tests/identity.rs @@ -12,7 +12,7 @@ use workshop_rs::catalog::{Catalog, Locale}; /// (`workshop-catalog-gen build`) recomputes it and the pin is updated /// deliberately together with the data. const PINNED_CATALOG_DIGEST: &str = - "2d98f50b523e38bfbff59a952c0e4c3c80e8c7f972bb9b30a81fdabc0c46de19"; + "3283113d49f3ff8f294b092c0a15e2bcef9e14805ed28fac71baf803e804014f"; #[test] fn committed_catalog_digest_is_pinned() { diff --git a/docs/source-attribution/catalog.md b/docs/source-attribution/catalog.md index 32f88d49..3518bd91 100644 --- a/docs/source-attribution/catalog.md +++ b/docs/source-attribution/catalog.md @@ -25,6 +25,7 @@ is embedded in the dataset and surfaced by `workshop-rs-cli version --json`. | Action/Value parameter and return signatures | Workshop.codes structured article properties (Returns, Parameters, Type, and Default), cross-checked against the pinned OverPy metadata and static OSTW data; entries without convergent sources remain explicitly unresolved. Representative article links are recorded with the catalog entries. | | `Create Dummy Bot` hero parameter union (`Hero|Array`) | Workshop behavior accepts a single Hero or Hero array and selects randomly when multiple heroes are provided; pinned OverPy 9.7.10 texture-tag setup emits `getAllHeroes()` into `Create Dummy Bot`. | | `Create Dummy Bot` slot coercion (`paramCoercions[2]`: `falseAsNumber`, `trueAsNumber`) | Pinned OverPy 9.7.10 `optimizeForSize` emission writes `False`/`True` for the `Create Dummy Bot` slot; observed by the opy-rs builtin probe (`catalog-missing-coercion`, wrightkit/opy-rs#370) and accepted for that parameter only under ADR-0014. | +| `zh-CN` spellings of `break` (`中断`) and `isFiringSecondary` (`正在使用辅助武器`) | Pinned OverPy 9.7.10 zh-CN emission for Bastion, matching the locale corpus export (`actions.break`, `values..isFiringSecondaryFire`). `中断` is Break, not an Abort alias; the earlier `跳出循环` and `正在发射辅助攻击` spellings stay as parse aliases. | | Action/Value signature cross-check | Representative Workshop.codes article links remain recorded with the catalog entries; fetched snapshots and CI results are not generator or runtime inputs. | | Settings emission table (`src/settings/table.rs` and generated data files) | Hand-written fixture surface plus the reviewed `workshop-data` export at commit `d854bf01fc7bbf3b2169f67408c07a8da8989ad6`; generated entries, names, locale mappings, and source paths are committed together in the declared multi-locale projection, while pinned OverPy 9.7.10 output remains the behavioral check. |