@wordpress/components 28.8.8 → 28.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/border-control/border-control-dropdown/component.js +12 -12
  2. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  3. package/build/color-palette/index.js +1 -1
  4. package/build/color-palette/index.js.map +1 -1
  5. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  6. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  7. package/build/font-size-picker/index.native.js +6 -6
  8. package/build/font-size-picker/index.native.js.map +1 -1
  9. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  10. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  11. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  12. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  13. package/build/mobile/bottom-sheet-select-control/index.native.js +2 -2
  14. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  15. package/build/tools-panel/tools-panel-header/component.js +1 -1
  16. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  17. package/build-module/border-control/border-control-dropdown/component.js +12 -12
  18. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  19. package/build-module/color-palette/index.js +1 -1
  20. package/build-module/color-palette/index.js.map +1 -1
  21. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  22. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  23. package/build-module/font-size-picker/index.native.js +7 -7
  24. package/build-module/font-size-picker/index.native.js.map +1 -1
  25. package/build-module/mobile/bottom-sheet/range-cell.native.js +1 -1
  26. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  27. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  28. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  29. package/build-module/mobile/bottom-sheet-select-control/index.native.js +2 -2
  30. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  31. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  32. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  33. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  34. package/package.json +2 -2
  35. package/src/border-control/border-control-dropdown/component.tsx +24 -12
  36. package/src/color-palette/index.tsx +1 -1
  37. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  38. package/src/font-size-picker/index.native.js +7 -7
  39. package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
  40. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  41. package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
  42. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  43. package/tsconfig.tsbuildinfo +1 -1
@@ -76,15 +76,19 @@ const getToggleAriaLabel = (
76
76
  const ariaLabelValue = getAriaLabelColorValue( colorObject.color );
77
77
  return style
78
78
  ? sprintf(
79
- // translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:". %3$s: The current border style selection e.g. "solid".
80
- 'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',
79
+ // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:". 3: The current border style selection e.g. "solid".
80
+ __(
81
+ 'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'
82
+ ),
81
83
  colorObject.name,
82
84
  ariaLabelValue,
83
85
  style
84
86
  )
85
87
  : sprintf(
86
- // translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:".
87
- 'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',
88
+ // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:".
89
+ __(
90
+ 'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
91
+ ),
88
92
  colorObject.name,
89
93
  ariaLabelValue
90
94
  );
@@ -94,14 +98,18 @@ const getToggleAriaLabel = (
94
98
  const ariaLabelValue = getAriaLabelColorValue( colorValue );
95
99
  return style
96
100
  ? sprintf(
97
- // translators: %1$s: The color's hex code e.g.: "#f00:". %2$s: The current border style selection e.g. "solid".
98
- 'Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',
101
+ // translators: 1: The color's hex code e.g.: "#f00:". 2: The current border style selection e.g. "solid".
102
+ __(
103
+ 'Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'
104
+ ),
99
105
  ariaLabelValue,
100
106
  style
101
107
  )
102
108
  : sprintf(
103
- // translators: %1$s: The color's hex code e.g: "#f00".
104
- 'Border color and style picker. The currently selected color has a value of "%1$s".',
109
+ // translators: %s: The color's hex code e.g: "#f00".
110
+ __(
111
+ 'Border color and style picker. The currently selected color has a value of "%s".'
112
+ ),
105
113
  ariaLabelValue
106
114
  );
107
115
  }
@@ -111,8 +119,10 @@ const getToggleAriaLabel = (
111
119
 
112
120
  if ( colorObject ) {
113
121
  return sprintf(
114
- // translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g: "#f00".
115
- 'Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',
122
+ // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g: "#f00".
123
+ __(
124
+ 'Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
125
+ ),
116
126
  colorObject.name,
117
127
  getAriaLabelColorValue( colorObject.color )
118
128
  );
@@ -120,8 +130,10 @@ const getToggleAriaLabel = (
120
130
 
121
131
  if ( colorValue ) {
122
132
  return sprintf(
123
- // translators: %1$s: The color's hex code e.g: "#f00".
124
- 'Border color picker. The currently selected color has a value of "%1$s".',
133
+ // translators: %s: The color's hex code e.g: "#f00".
134
+ __(
135
+ 'Border color picker. The currently selected color has a value of "%s".'
136
+ ),
125
137
  getAriaLabelColorValue( colorValue )
126
138
  );
127
139
  }
@@ -233,7 +233,7 @@ function UnforwardedColorPalette(
233
233
  const displayValue = value?.replace( /^var\((.+)\)$/, '$1' );
234
234
  const customColorAccessibleLabel = !! displayValue
235
235
  ? sprintf(
236
- // translators: %1$s: The name of the color e.g: "vivid red". %2$s: The color's hex code e.g: "#f00".
236
+ // translators: 1: The name of the color e.g: "vivid red". 2: The color's hex code e.g: "#f00".
237
237
  __(
238
238
  'Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
239
239
  ),
@@ -56,7 +56,7 @@ function ControlPointButton( {
56
56
  <>
57
57
  <Button
58
58
  aria-label={ sprintf(
59
- // translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151).
59
+ // translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).
60
60
  __(
61
61
  'Gradient control point at position %1$s%% with color code %2$s.'
62
62
  ),
@@ -9,7 +9,7 @@ import { View, useWindowDimensions } from 'react-native';
9
9
  import { useNavigation } from '@react-navigation/native';
10
10
  import { useState } from '@wordpress/element';
11
11
  import { Icon, chevronRight, check } from '@wordpress/icons';
12
- import { __, sprintf } from '@wordpress/i18n';
12
+ import { __, _x, sprintf } from '@wordpress/i18n';
13
13
 
14
14
  /**
15
15
  * Internal dependencies
@@ -63,8 +63,8 @@ function FontSizePicker( {
63
63
  } );
64
64
 
65
65
  const accessibilityLabel = sprintf(
66
- // translators: %1$s: Font size name e.g. Small
67
- __( 'Font Size, %1$s' ),
66
+ // translators: %s: Font size name e.g. Small
67
+ __( 'Font Size, %s' ),
68
68
  selectedOption.name
69
69
  );
70
70
 
@@ -77,8 +77,8 @@ function FontSizePicker( {
77
77
  value={
78
78
  selectedValue
79
79
  ? sprintf(
80
- // translators: %1$s: Select control font size name e.g. Small, %2$s: Select control font size e.g. 12px
81
- __( '%1$s (%2$s)' ),
80
+ // translators: 1: Select control font size name e.g. Small. 2: Select control font size e.g. 12px
81
+ _x( '%1$s (%2$s)', 'font size' ),
82
82
  selectedOption.name,
83
83
  selectedPxValue
84
84
  )
@@ -88,7 +88,7 @@ function FontSizePicker( {
88
88
  accessibilityRole="button"
89
89
  accessibilityLabel={ accessibilityLabel }
90
90
  accessibilityHint={ sprintf(
91
- // translators: %s: Select control button label e.g. Small
91
+ // translators: %s: Select control button label e.g. "Button width"
92
92
  __( 'Navigates to select %s' ),
93
93
  selectedOption.name
94
94
  ) }
@@ -143,7 +143,7 @@ function FontSizePicker( {
143
143
  accessibilityLabel={
144
144
  item.sizePx === selectedValue
145
145
  ? sprintf(
146
- // translators: %s: Select font size option value e.g: "Selected: Large".
146
+ // translators: %s: The selected option.
147
147
  __( 'Selected: %s' ),
148
148
  item.name
149
149
  )
@@ -165,7 +165,7 @@ class BottomSheetRangeCell extends Component {
165
165
 
166
166
  const getAccessibilityLabel = () => {
167
167
  return sprintf(
168
- /* translators: accessibility text. Inform about current value. %1$s: Control label %2$s: setting label (example: width), %3$s: Current value. %4$s: value measurement unit (example: pixels) */
168
+ /* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
169
169
  __( '%1$s. %2$s is %3$s %4$s.' ),
170
170
  cellProps.label,
171
171
  settingLabel,
@@ -159,7 +159,7 @@ class BottomSheetStepperCell extends Component {
159
159
  };
160
160
 
161
161
  const accessibilityLabel = sprintf(
162
- /* translators: accessibility text. Inform about current value. %1$s: Control label %2$s: setting label (example: width), %3$s: Current value. %4$s: value measurement unit (example: pixels) */
162
+ /* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
163
163
  __( '%1$s. %2$s is %3$s %4$s.' ),
164
164
  label,
165
165
  settingLabel,
@@ -64,7 +64,7 @@ const BottomSheetSelectControl = ( {
64
64
  onPress={ openSubSheet }
65
65
  accessibilityRole="button"
66
66
  accessibilityLabel={ sprintf(
67
- // translators: %1$s: Select control button label e.g. "Button width". %2$s: Select control option value e.g: "Auto, 25%".
67
+ // translators: 1: Select control button label e.g. "Button width". 2: Select control option value e.g: "Auto, 25%".
68
68
  __( '%1$s. Currently selected: %2$s' ),
69
69
  label,
70
70
  selectedOption.label
@@ -102,7 +102,7 @@ const BottomSheetSelectControl = ( {
102
102
  accessibilityLabel={
103
103
  item.value === selectedValue
104
104
  ? sprintf(
105
- // translators: %s: Select control option value e.g: "Auto, 25%".
105
+ // translators: %s: The selected option.
106
106
  __( 'Selected: %s' ),
107
107
  item.label
108
108
  )
@@ -106,7 +106,7 @@ const OptionalControlsGroup = ( {
106
106
  )
107
107
  : sprintf(
108
108
  // translators: %s: The name of the control to display e.g. "Padding".
109
- __( 'Show %s' ),
109
+ _x( 'Show %s', 'input control' ),
110
110
  label
111
111
  );
112
112