Skip to content

Commit

Permalink
SpacingSizesControl: Use generic label for linked button (#66304)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: madhusudhand <[email protected]>
Co-authored-by: mikachan <[email protected]>
  • Loading branch information
4 people authored Oct 22, 2024
1 parent ba2d08e commit 1461ef1
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@
*/
import { Button, Tooltip } from '@wordpress/components';
import { link, linkOff } from '@wordpress/icons';
import { __, sprintf } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';

export default function LinkedButton( { isLinked, ...props } ) {
const label = isLinked
? sprintf(
// translators: 1. Type of spacing being modified (padding, margin, etc).
__( 'Unlink %1$s' ),
props.label.toLowerCase()
).trim()
: sprintf(
// translators: 1. Type of spacing being modified (padding, margin, etc).
__( 'Link %1$s' ),
props.label.toLowerCase()
).trim();
const label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );

return (
<Tooltip text={ label }>
Expand Down

1 comment on commit 1461ef1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 1461ef1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11460038716
📝 Reported issues:

Please sign in to comment.