Skip to content

Commit

Permalink
Rename block patterns in translations strings (#24457)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiy authored Aug 10, 2020
1 parent fd54e47 commit 1552291
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/class-wp-block-patterns-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ final class WP_Block_Patterns_Registry {
*/
public function register( $pattern_name, $pattern_properties ) {
if ( ! isset( $pattern_name ) || ! is_string( $pattern_name ) ) {
$message = __( 'Pattern name must be a string.', 'gutenberg' );
$message = __( 'Block pattern name must be a string.', 'gutenberg' );
_doing_it_wrong( __METHOD__, $message, '7.8.0' );
return false;
}

if ( ! isset( $pattern_properties['title'] ) || ! is_string( $pattern_properties['title'] ) ) {
$message = __( 'Pattern title must be a string.', 'gutenberg' );
$message = __( 'Block pattern title must be a string.', 'gutenberg' );
_doing_it_wrong( __METHOD__, $message, '8.5.0' );
return false;
}

if ( ! isset( $pattern_properties['content'] ) || ! is_string( $pattern_properties['content'] ) ) {
$message = __( 'Pattern content must be a string.', 'gutenberg' );
$message = __( 'Block pattern content must be a string.', 'gutenberg' );
_doing_it_wrong( __METHOD__, $message, '8.5.0' );
return false;
}
Expand All @@ -71,7 +71,7 @@ public function register( $pattern_name, $pattern_properties ) {
public function unregister( $pattern_name ) {
if ( ! $this->is_registered( $pattern_name ) ) {
/* translators: 1: Pattern name. */
$message = sprintf( __( 'Pattern "%1$s" not found.', 'gutenberg' ), $pattern_name );
$message = sprintf( __( 'Block pattern "%1$s" not found.', 'gutenberg' ), $pattern_name );
_doing_it_wrong( __METHOD__, $message, '7.8.0' );
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const usePatternsState = ( onInsert ) => {
createSuccessNotice(
sprintf(
/* translators: %s: block pattern title. */
__( 'Pattern "%s" inserted.' ),
__( 'Block pattern "%s" inserted.' ),
pattern.title
),
{
Expand Down

0 comments on commit 1552291

Please sign in to comment.