Goal
Text emitted by workshop-rs is accepted by the Workshop client wherever the equivalent OverPy output is: constant wrappers, boolean setting values and action spellings follow the forms the client accepts, in every supported locale.
Context
A production project (OWBastion/Bastion) built through Wright and through pinned OverPy 9.7.10 was imported into the client line by line. The client rejected Wright's zh-CN output at Team(队伍1) and at 队列中的玩家可以加入: 关闭 (OverPy writes 队伍1 and 否). The canonical structural comparison between the two outputs was clean, so it does not detect these. Comparing the two artifacts by vocabulary, call-name counts and the settings block found the classes below. All are reproduced with workshop-rs-cli v0.8.0 alone, by emitting OverPy-shaped input, so the owner is this repository.
| Input (OverPy output) |
workshop-rs-cli emit, en-US |
Note |
All Players(Team 1) |
All Players(Team(Team 1)) |
wrapper added; OverPy writes the bare Team constant in a Team-typed slot |
Players On Hero(Hero(Mercy), Team 1) |
Players On Hero(Mercy, Team(Team 1)) |
Hero(...) removed in a Hero-typed slot |
Array(Hero(D.Va), Hero(Reinhardt), Hero(Winston)) |
Array(Hero(D.Va), Reinhardt, Winston) |
only the first element keeps its wrapper |
Custom String("x{0}", Button(Reload)) |
Custom String("x{0}", Reload) |
Button(...) removed in a generic slot |
Allow Players Who Are In Queue: No (settings) |
Allow Players Who Are In Queue: Off |
wrong word for a yes/no setting |
- zh-CN. The same input converted to zh-CN gives
Team(队伍1): the wrapper name is not localized (the localized name is 队伍, as in the real-project fixtures). The array case is wrapped on every element in this path (数组(英雄(D.Va), 英雄(莱因哈特), 英雄(温斯顿))), so the wrapping rule differs between emit paths.
- Action spellings (zh-CN). Where the catalog lists several spellings, emission picks a different one from OverPy for ten actions:
摧毁所有图标 / 消除所有图标, 摧毁所有世界内文本 / 消除所有地图文本, 摧毁所有效果 / 消除所有效果, 摧毁所有HUD文本 / 消除所有HUD文本, 禁用内置游戏模式播报员 / 关闭游戏预设通告模式, 禁用内置游戏模式完成 / 关闭游戏预设完成条件, 禁用内置游戏模式音乐 / 关闭游戏预设音乐模式, 禁用内置游戏模式计分 / 关闭游戏预设计分模式, 启用内置游戏模式音乐 / 开启游戏预设音乐模式, 继续比赛时间 / 比赛时间继续 (workshop-rs / OverPy). Only the first two of these classes have been confirmed to fail in the client; the rest are unverified there.
- Counts in the project. zh-CN
main: 246 Team( wrappers (OverPy has none), 220 按钮( in OverPy against 34 in the Wright output. en-US externalMain: Hero( 135 in OverPy against 9.
Client acceptance of OverPy's forms is established by their production use; acceptance of the other forms is unknown, and the observed failures show at least some are rejected.
Scope
- Decide and document when an enum constant is written with its wrapper (
Hero(...), Button(...), Team(...)) and when bare, per slot type, and make every emit path apply it the same way in each locale.
- Localize wrapper names in every locale the catalog declares.
- Emit the client's word for boolean settings that take a yes/no value.
- Where the catalog lists several spellings of an action, choose the emitted one by the evidence classes in ADR-0014, and record the choice.
- Regression coverage: parse then emit of the table's inputs in en-US and zh-CN reproduces them; parse then emit of each OverPy-generated real-project fixture preserves the call-name counts of
Team/Hero/Button wrappers and adds no token absent from the input.
Non-goals
Acceptance criteria
- The table above round-trips unchanged in en-US and zh-CN.
- The fixture round-trip check passes in CI.
- A short document states the wrapper rule per slot type with its evidence.
Dependencies
Related: #297, #299, #300, ADR-0014, and wrightkit/opy-rs#388.
Goal
Text emitted by
workshop-rsis accepted by the Workshop client wherever the equivalent OverPy output is: constant wrappers, boolean setting values and action spellings follow the forms the client accepts, in every supported locale.Context
A production project (
OWBastion/Bastion) built through Wright and through pinned OverPy 9.7.10 was imported into the client line by line. The client rejected Wright's zh-CN output atTeam(队伍1)and at队列中的玩家可以加入: 关闭(OverPy writes队伍1and否). The canonical structural comparison between the two outputs was clean, so it does not detect these. Comparing the two artifacts by vocabulary, call-name counts and the settings block found the classes below. All are reproduced withworkshop-rs-cliv0.8.0 alone, by emitting OverPy-shaped input, so the owner is this repository.workshop-rs-cli emit, en-USAll Players(Team 1)All Players(Team(Team 1))Players On Hero(Hero(Mercy), Team 1)Players On Hero(Mercy, Team(Team 1))Hero(...)removed in a Hero-typed slotArray(Hero(D.Va), Hero(Reinhardt), Hero(Winston))Array(Hero(D.Va), Reinhardt, Winston)Custom String("x{0}", Button(Reload))Custom String("x{0}", Reload)Button(...)removed in a generic slotAllow Players Who Are In Queue: No(settings)Allow Players Who Are In Queue: OffTeam(队伍1): the wrapper name is not localized (the localized name is队伍, as in the real-project fixtures). The array case is wrapped on every element in this path (数组(英雄(D.Va), 英雄(莱因哈特), 英雄(温斯顿))), so the wrapping rule differs between emit paths.摧毁所有图标/消除所有图标,摧毁所有世界内文本/消除所有地图文本,摧毁所有效果/消除所有效果,摧毁所有HUD文本/消除所有HUD文本,禁用内置游戏模式播报员/关闭游戏预设通告模式,禁用内置游戏模式完成/关闭游戏预设完成条件,禁用内置游戏模式音乐/关闭游戏预设音乐模式,禁用内置游戏模式计分/关闭游戏预设计分模式,启用内置游戏模式音乐/开启游戏预设音乐模式,继续比赛时间/比赛时间继续(workshop-rs / OverPy). Only the first two of these classes have been confirmed to fail in the client; the rest are unverified there.main: 246Team(wrappers (OverPy has none), 220按钮(in OverPy against 34 in the Wright output. en-USexternalMain:Hero(135 in OverPy against 9.Client acceptance of OverPy's forms is established by their production use; acceptance of the other forms is unknown, and the observed failures show at least some are rejected.
Scope
Hero(...),Button(...),Team(...)) and when bare, per slot type, and make every emit path apply it the same way in each locale.Team/Hero/Buttonwrappers and adds no token absent from the input.Non-goals
0versusFalse(done in fix(parser)!: preserve contextual literal substitutions #300).opy-rswrites into theProgram(tracked inopy-rs).Acceptance criteria
Dependencies
Related: #297, #299, #300, ADR-0014, and
wrightkit/opy-rs#388.