Skip to content

Commit

Permalink
I18N: update string concatenation method in read more block (#47815)
Browse files Browse the repository at this point in the history
  • Loading branch information
kebbet authored Feb 7, 2023
1 parent e7f096e commit 115177e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/block-library/src/read-more/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ function render_block_core_read_more( $attributes, $content, $block ) {
return '';
}

$post_ID = $block->context['postId'];
$post_title = get_the_title( $post_ID );
$post_ID = $block->context['postId'];
$post_title = get_the_title( $post_ID );
if ( '' === $post_title ) {
$post_title = sprintf(
/* translators: %s is post ID to describe the link for screen readers. */
__( 'untitled post %s' ),
$post_ID
);
}
$screen_reader_text = sprintf(
/* translators: %s is either the post title or post ID to describe the link for screen readers. */
__( ': %s' ),
'' !== $post_title ? $post_title : __( 'untitled post ' ) . $post_ID
$post_title
);
$justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}";
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) );
Expand Down

1 comment on commit 115177e

@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 115177e.
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/4112452697
📝 Reported issues:

Please sign in to comment.