Skip to content

Commit 86a5230

Browse files
baozhoutaoclaude
andcommitted
fix(ci): escape NUL separator in extract test; regenerate translation reference doc
- The dots-preserved assertion in i18n-extract.test.ts embedded two raw NUL bytes (0x00) as join separators, tripping the raw-NUL-byte guard -- use the unicode escape sequence instead (byte-identical at runtime). - Regenerate content/docs/references/system/translation.mdx for the new resultDialog translation node (gen:schema + gen:docs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9f8acb6 commit 86a5230

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

content/docs/references/system/translation.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,29 @@ Translation data for a single field.
1616
## TypeScript Usage
1717

1818
```typescript
19-
import { AppTranslationBundle, CoverageBreakdownEntry, FieldTranslation, Locale, MessageFormat, ObjectTranslationData, ObjectTranslationNode, TranslationBundle, TranslationConfig, TranslationCoverageResult, TranslationData, TranslationDiffItem, TranslationDiffStatus, TranslationFileOrganization } from '@objectstack/spec/system';
20-
import type { AppTranslationBundle, CoverageBreakdownEntry, FieldTranslation, Locale, MessageFormat, ObjectTranslationData, ObjectTranslationNode, TranslationBundle, TranslationConfig, TranslationCoverageResult, TranslationData, TranslationDiffItem, TranslationDiffStatus, TranslationFileOrganization } from '@objectstack/spec/system';
19+
import { ActionResultDialogTranslation, AppTranslationBundle, CoverageBreakdownEntry, FieldTranslation, Locale, MessageFormat, ObjectTranslationData, ObjectTranslationNode, TranslationBundle, TranslationConfig, TranslationCoverageResult, TranslationData, TranslationDiffItem, TranslationDiffStatus, TranslationFileOrganization } from '@objectstack/spec/system';
20+
import type { ActionResultDialogTranslation, AppTranslationBundle, CoverageBreakdownEntry, FieldTranslation, Locale, MessageFormat, ObjectTranslationData, ObjectTranslationNode, TranslationBundle, TranslationConfig, TranslationCoverageResult, TranslationData, TranslationDiffItem, TranslationDiffStatus, TranslationFileOrganization } from '@objectstack/spec/system';
2121

2222
// Validate data
23-
const result = AppTranslationBundle.parse(data);
23+
const result = ActionResultDialogTranslation.parse(data);
2424
```
2525

26+
---
27+
28+
## ActionResultDialogTranslation
29+
30+
Translations for an action result dialog
31+
32+
### Properties
33+
34+
| Property | Type | Required | Description |
35+
| :--- | :--- | :--- | :--- |
36+
| **title** | `string` | optional | Translated result dialog title |
37+
| **description** | `string` | optional | Translated result dialog description |
38+
| **acknowledge** | `string` | optional | Translated acknowledge button label |
39+
| **fields** | `Record<string, string>` | optional | Result field labels keyed by the literal field path declared in the action metadata (keys may contain dots) |
40+
41+
2642
---
2743

2844
## AppTranslationBundle
@@ -110,7 +126,7 @@ Translation data for a single object
110126
| **description** | `string` | optional | Translated object description |
111127
| **fields** | `Record<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>` | optional | Field-level translations |
112128
| **_views** | `Record<string, { label?: string; description?: string; emptyState?: object }>` | optional | View translations keyed by view name |
113-
| **_actions** | `Record<string, { label?: string; confirmText?: string; successMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }> }>` | optional | Action translations keyed by action name |
129+
| **_actions** | `Record<string, { label?: string; confirmText?: string; successMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>; … }>` | optional | Action translations keyed by action name |
114130
| **_sections** | `Record<string, { label?: string; description?: string }>` | optional | Section translations keyed by section name |
115131

116132

@@ -132,7 +148,7 @@ Object-first aggregated translation node
132148
| **_options** | `Record<string, Record<string, string>>` | optional | Object-scoped picklist option translations keyed by field name |
133149
| **_views** | `Record<string, { label?: string; description?: string; emptyState?: object }>` | optional | View translations keyed by view name |
134150
| **_sections** | `Record<string, { label?: string }>` | optional | Section translations keyed by section name |
135-
| **_actions** | `Record<string, { label?: string; confirmMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }> }>` | optional | Action translations keyed by action name |
151+
| **_actions** | `Record<string, { label?: string; confirmMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>; resultDialog?: object }>` | optional | Action translations keyed by action name |
136152
| **_notifications** | `Record<string, { title?: string; body?: string }>` | optional | Notification translations keyed by notification name |
137153
| **_errors** | `Record<string, string>` | optional | Error message translations keyed by error code |
138154

@@ -195,7 +211,7 @@ Translation data for objects, apps, and UI messages
195211
| **apps** | `Record<string, { label: string; description?: string; navigation?: Record<string, { label: string }> }>` | optional | App translations keyed by app name |
196212
| **messages** | `Record<string, string>` | optional | UI message translations keyed by message ID |
197213
| **validationMessages** | `Record<string, string>` | optional | Translatable validation error messages keyed by rule name (e.g., `{"discount_limit": "折扣不能超过40%"}`) |
198-
| **globalActions** | `Record<string, { label?: string; confirmText?: string; successMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }> }>` | optional | Global action translations keyed by action name |
214+
| **globalActions** | `Record<string, { label?: string; confirmText?: string; successMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>; … }>` | optional | Global action translations keyed by action name |
199215
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, { label?: string }>; widgets?: Record<string, { title?: string; description?: string }> }>` | optional | Dashboard translations keyed by dashboard name |
200216
| **settings** | `Record<string, { title?: string; description?: string; groups?: Record<string, { title?: string; description?: string }>; keys?: Record<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>; … }>` | optional | Settings manifest translations keyed by namespace |
201217
| **metadataForms** | `Record<string, { label?: string; description?: string; sections?: Record<string, { label?: string; description?: string }>; fields?: Record<string, { label?: string; helpText?: string; placeholder?: string }> }>` | optional | Translations for metadata-type configuration forms keyed by metadata type |
10 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)