File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
packages/block-library/src/tab Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import clsx from 'clsx';
66/**
77 * WordPress dependencies
88 */
9- import { __ } from '@wordpress/i18n' ;
9+ import { __ , sprintf } from '@wordpress/i18n' ;
1010import { RichText } from '@wordpress/block-editor' ;
1111import { decodeEntities } from '@wordpress/html-entities' ;
1212
@@ -79,21 +79,23 @@ export default function TabsList( {
7979 < RichText
8080 ref = { labelRef }
8181 tagName = "span"
82- allowedFormats = { [
83- 'core/bold' ,
84- 'core/italic' ,
85- 'core/strikethrough' ,
86- ] }
87- placeholder = {
88- __ ( 'Tab' ) + ` ${ currentBlockIndex + 1 } …`
89- }
82+ withoutInteractiveFormatting
83+ placeholder = { sprintf (
84+ /* translators: %d is the tab index + 1 */
85+ __ ( 'Tab %d…' ) ,
86+ currentBlockIndex + 1
87+ ) }
9088 value = { decodeEntities ( currentLabel ) }
9189 onChange = { onLabelChange }
9290 />
9391 ) : (
9492 < span >
9593 { decodeEntities ( siblingLabel ) ||
96- __ ( 'Tab' ) + ` ${ index + 1 } ` }
94+ sprintf (
95+ /* translators: %d is the tab index + 1 */
96+ __ ( 'Tab %d' ) ,
97+ index + 1
98+ ) }
9799 </ span >
98100 ) }
99101 </ button >
You can’t perform that action at this time.
0 commit comments