|
4 | 4 | { |
5 | 5 | "id": 1, |
6 | 6 | "prompt": "Add Simplified Chinese for the `support_case` object: its label and plural, the `status` field with options New / Open / Closed, the `close` action, and a welcome message that greets the user by name.", |
7 | | - "expected_output": "A `TranslationData` per locale under `objects.support_case` — `label`, `pluralLabel`, `fields.status.label`, `fields.status.options` keyed by the STORED option value (`new`, `open`, `closed`, never the display label), `_actions.close.label` — assembled with `defineTranslationBundle({ en, 'zh-CN': zhCN })` and registered under `defineStack({ translations })`. The message uses double-brace interpolation, `'welcome.user': '欢迎,{{userName}}!'`; there is no ICU plural/select.", |
| 7 | + "expected_output": "A `TranslationData` per locale under `objects.support_case` — `label`, `pluralLabel`, `fields.status.label`, `fields.status.options` keyed by the STORED option value (`new`, `open`, `closed`, never the display label), `_actions.close.label` — assembled with `defineTranslationBundle({ en, 'zh-CN': zhCN })` and registered under `defineStack({ translations })`. The message uses double-brace interpolation, `'welcome.user': '欢迎,{{userName}}!'`.", |
8 | 8 | "files": [], |
9 | 9 | "assertions": { |
10 | 10 | "must_contain": ["defineTranslationBundle", "objects", "pluralLabel", "options", "_actions", "{{"], |
|
24 | 24 | { |
25 | 25 | "id": 3, |
26 | 26 | "prompt": "A customer admin wants to relabel `account` as 客户 in their Studio without waiting for a redeploy.", |
27 | | - "expected_output": "A `translation` metadata item (author with `defineTranslation`, shape `TranslationItemSchema`) carrying `locale: 'zh-CN'` and the same `objects.account.label` group as a file bundle; published items layer over the shipped bundles at boot and on every publish, and deleting the item restores the shipped value. One locale per item; the retired `o.*` dialect is rejected on this door too.", |
| 27 | + "expected_output": "A `translation` metadata item (author with `defineTranslation`, shape `TranslationItemSchema`) carrying `locale: 'zh-CN'` and the same `objects.account.label` group as a file bundle; published items layer over the shipped bundles at boot and on every publish, and deleting the item restores the shipped value. One locale per item.", |
28 | 28 | "files": [], |
29 | 29 | "assertions": { |
30 | 30 | "must_contain": ["translation", "locale", "objects", "defineTranslation"], |
|
44 | 44 | { |
45 | 45 | "id": 5, |
46 | 46 | "prompt": "`os i18n check` reports zh-CN is missing app, navigation and dashboard keys even though we just ran `os i18n extract`. What is wrong?", |
47 | | - "expected_output": "Diagnoses that `--objects-only` is on by default, so extract wrote only the `objects` / `globalActions` subtree while check also demands `apps`, `navigation`, `dashboard`, `widget`, `page` and `flow` keys. Re-runs `os i18n extract --no-objects-only` (or hand-authors those groups), re-checks with `os i18n check --locales=zh-CN`, and adds `--strict` / `--threshold` in CI; `extract --check` is the separate freshness gate.", |
| 47 | + "expected_output": "Diagnoses that `--objects-only` is on by default, so extract wrote only the `objects` / `globalActions` subtree while check also demands `apps`, `navigation`, `dashboard`, `widget`, `page` and `flow` keys. Re-runs `os i18n extract --no-objects-only` (or hand-authors those groups), re-checks with `os i18n check --locales=zh-CN`, and adds `--strict` / `--threshold` in CI.", |
48 | 48 | "files": [], |
49 | 49 | "assertions": { |
50 | 50 | "must_contain": ["--no-objects-only", "os i18n check", "apps", "--strict"], |
|
54 | 54 | { |
55 | 55 | "id": 6, |
56 | 56 | "prompt": "Add zh-CN for the `pipeline_by_stage` report, the `sales_manager` permission set, the `regional_lead` position and the `deal_stage` picklist's option labels.", |
57 | | - "expected_output": "Top-level groups keyed by name: `reports.pipeline_by_stage` and `positions.regional_lead` (`label`, `description`), `permissions.sales_manager` (the same, spelled as the stack's `permissions[]`, not the camelCase name), `picklists.deal_stage.options` by stored value, inherited by every field referencing the picklist.", |
| 57 | + "expected_output": "Top-level groups keyed by name: `reports.pipeline_by_stage` and `positions.regional_lead` (`label`, `description`), `permissions.sales_manager` (the same, spelled as the stack's `permissions[]`, not the camelCase name), `picklists.deal_stage.options` by stored value.", |
58 | 58 | "files": [], |
59 | 59 | "assertions": { |
60 | 60 | "must_contain": ["reports", "permissions", "positions", "picklists"], |
|
74 | 74 | { |
75 | 75 | "id": 8, |
76 | 76 | "prompt": "In zh-CN the `Products` grid heading on the `crm_opportunity` form and the `Open Tasks` block heading of the joined `showcase_task_overview` report are still English.", |
77 | | - "expected_output": "`objects.crm_opportunity_line_item.fields.opportunity.inlineTitle` — the field lives on the child object, so the key is the child's, and an untranslated `inlineTitle` keeps its authored text (no fallback to the child's plural label); `reports.showcase_task_overview.blocks.open_block.label`, keyed by the block's required `name`. Neither is a `pages.*.components` key.", |
| 77 | + "expected_output": "`objects.crm_opportunity_line_item.fields.opportunity.inlineTitle` — the field lives on the child object, so the key is the child's, and an untranslated `inlineTitle` keeps its authored text (no fallback to the child's plural label); `reports.showcase_task_overview.blocks.open_block.label`, keyed by the block's required `name`.", |
78 | 78 | "files": [], |
79 | 79 | "assertions": { |
80 | 80 | "must_contain": ["inlineTitle", "crm_opportunity_line_item", "blocks", "open_block"], |
81 | 81 | "must_not_contain": ["fields.opportunity_line_item", "components.open_block"] |
82 | 82 | } |
| 83 | + }, |
| 84 | + { |
| 85 | + "id": 9, |
| 86 | + "prompt": "Our `crm_manual` doc book ships in English and zh-CN, but the docs sidebar still shows the book title and its `getting_started` section title in English.", |
| 87 | + "expected_output": "The `books` group, keyed by `Book.name`: `books.crm_manual.label` / `.description` and `books.crm_manual.groups.getting_started.label`, by the group's stable `key` (never its position); `os i18n extract --no-objects-only` seeds all three. The pages' own titles and bodies localize through `doc.translations`, and the inline `translations` map a book once carried stays retired.", |
| 88 | + "files": [], |
| 89 | + "assertions": { |
| 90 | + "must_contain": ["books", "groups", "getting_started", "doc.translations"], |
| 91 | + "must_not_contain": ["pages.crm_manual", "sections.getting_started"] |
| 92 | + } |
83 | 93 | } |
84 | 94 | ] |
85 | 95 | } |
0 commit comments