@@ -2237,6 +2237,29 @@ const appTranslationDataShape = () => ({
22372237 } ) . optional ( ) . describe ( 'Cross-namespace Settings UI strings' ) ,
22382238} ) ;
22392239
2240+ /**
2241+ * One column header of a settings `map` specifier: the key column
2242+ * (`keys.<key>.keyColumn`) or one value column (`keys.<key>.columns.<name>`).
2243+ * Its leaves are the two strings `SpecifierMapColumnSchema` and
2244+ * `SpecifierMapKeyColumnSchema` declare: `label`, and `description` translated
2245+ * as `help`, the spelling the setting's own entry uses for its `description`.
2246+ */
2247+ const settingsMapColumnTranslation = ( surface : string ) => strictObject ( {
2248+ surface,
2249+ history : TRANSLATION_HISTORY ,
2250+ aliases : { title : 'label' , header : 'label' , heading : 'label' , helpText : 'help' , hint : 'help' , description : 'help' } ,
2251+ // A specifier column pasted in whole carries these two. Neither is copy:
2252+ // the column's `name` is the record key this entry sits under, and its
2253+ // `kind` is declared by the specifier, so neither is renamed to a leaf here.
2254+ guidance : {
2255+ name : "a column's `name` is not translated: it is the key this entry sits under (`columns.<name>`), so write the entry there and drop `name`" ,
2256+ kind : "a column's `kind` is not translated: the `map` specifier declares it, so drop it from the translation" ,
2257+ } ,
2258+ } , {
2259+ label : z . string ( ) . optional ( ) . describe ( 'Translated column header' ) ,
2260+ help : z . string ( ) . optional ( ) . describe ( 'Translated column help text' ) ,
2261+ } ) ;
2262+
22402263/**
22412264 * The one group that is PLATFORM-ONLY, as a shape rather than a schema.
22422265 *
@@ -2266,22 +2289,6 @@ const appTranslationDataShape = () => ({
22662289 * A function, not a `const`, for the same reason
22672290 * {@link appTranslationDataShape} is one.
22682291 */
2269- /**
2270- * One column header of a settings `map` specifier: the key column
2271- * (`keys.<key>.keyColumn`) or one value column (`keys.<key>.columns.<name>`).
2272- * Its leaves are the two strings `SpecifierMapColumnSchema` and
2273- * `SpecifierMapKeyColumnSchema` declare: `label`, and `description` translated
2274- * as `help`, the spelling the setting's own entry uses for its `description`.
2275- */
2276- const settingsMapColumnTranslation = ( surface : string ) => strictObject ( {
2277- surface,
2278- history : TRANSLATION_HISTORY ,
2279- aliases : { title : 'label' , name : 'label' , header : 'label' , heading : 'label' , helpText : 'help' , hint : 'help' , description : 'help' } ,
2280- } , {
2281- label : z . string ( ) . optional ( ) . describe ( 'Translated column header' ) ,
2282- help : z . string ( ) . optional ( ) . describe ( 'Translated column help text' ) ,
2283- } ) ;
2284-
22852292const platformSettingsShape = ( ) => ( {
22862293 /**
22872294 * Settings manifest translations keyed by settings namespace
@@ -2340,7 +2347,7 @@ const platformSettingsShape = () => ({
23402347 history : TRANSLATION_HISTORY ,
23412348 aliases : {
23422349 title : 'label' , name : 'label' , helpText : 'help' , hint : 'help' , description : 'help' , choices : 'options' , values : 'options' ,
2343- keyHeader : 'keyColumn' , key_column : 'keyColumn' , headers : 'columns' , columnLabels : 'columns' ,
2350+ keyHeader : 'keyColumn' , headers : 'columns' , columnLabels : 'columns' ,
23442351 } ,
23452352 } , {
23462353 label : z . string ( ) . optional ( ) . describe ( 'Translated setting label' ) ,
0 commit comments