@@ -91,6 +91,27 @@ export const TranslationDataSchema = lazySchema(() => z.object({
9191
9292 /** Validation Error Messages */
9393 validationMessages : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) . describe ( 'Translatable validation error messages keyed by rule name (e.g., {"discount_limit": "折扣不能超过40%"})' ) ,
94+
95+ /**
96+ * Dashboard translations keyed by dashboard name.
97+ * Convention (auto-resolved by ObjectUI's `useObjectLabel`):
98+ * dashboards.<name>.label
99+ * dashboards.<name>.description
100+ * dashboards.<name>.actions.<actionUrl>.label
101+ * dashboards.<name>.widgets.<widgetId>.title
102+ * dashboards.<name>.widgets.<widgetId>.description
103+ */
104+ dashboards : z . record ( z . string ( ) , z . object ( {
105+ label : z . string ( ) . optional ( ) . describe ( 'Translated dashboard title' ) ,
106+ description : z . string ( ) . optional ( ) . describe ( 'Translated dashboard description' ) ,
107+ actions : z . record ( z . string ( ) , z . object ( {
108+ label : z . string ( ) . optional ( ) . describe ( 'Translated header action label' ) ,
109+ } ) ) . optional ( ) . describe ( 'Header action label translations keyed by action url/key' ) ,
110+ widgets : z . record ( z . string ( ) , z . object ( {
111+ title : z . string ( ) . optional ( ) . describe ( 'Translated widget title' ) ,
112+ description : z . string ( ) . optional ( ) . describe ( 'Translated widget description' ) ,
113+ } ) ) . optional ( ) . describe ( 'Widget translations keyed by widget id' ) ,
114+ } ) ) . optional ( ) . describe ( 'Dashboard translations keyed by dashboard name' ) ,
94115} ) . describe ( 'Translation data for objects, apps, and UI messages' ) ) ;
95116
96117export type TranslationData = z . infer < typeof TranslationDataSchema > ;
0 commit comments