Skip to content

Commit

Permalink
Link Control: Simplify the sprintf (#58831)
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian authored Feb 8, 2024
1 parent 818b3fe commit 55e838f
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ export default function LinkPreview( {
<Button
icon={ copySmall }
label={ sprintf(
// Translators: %1$s is a placeholder for an optional colon, %2$s is a placeholder for the link URL (if present).
__( 'Copy link%1$s%2$s' ), // Ends up looking like "Copy link: https://example.com".
isEmptyURL ? '' : ': ',
value.url
// Translators: %s is a placeholder for the link URL and an optional colon, (if a Link URL is present).
__( 'Copy link%s' ), // Ends up looking like "Copy link: https://example.com".
isEmptyURL ? '' : ': ' + value.url
) }
ref={ ref }
disabled={ isEmptyURL }
Expand Down

0 comments on commit 55e838f

Please sign in to comment.