From d5561845d762eb4425b115562c36085456066d7f Mon Sep 17 00:00:00 2001 From: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:15:58 +1000 Subject: [PATCH] Block Library: Remove Gutenberg i18n domain from block-library package (#64701). As these files are distributed to WordPress in an unaltered form, the domain needs to be removed to allow it to be added to the WordPress translations. Co-authored-by: peterwilsoncc Co-authored-by: ramonjd --- packages/block-library/src/comment-date/index.php | 2 +- packages/block-library/src/form/index.php | 4 ++-- packages/block-library/src/post-date/index.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/comment-date/index.php b/packages/block-library/src/comment-date/index.php index 8deed94132488..bdb6fd5ba42ae 100644 --- a/packages/block-library/src/comment-date/index.php +++ b/packages/block-library/src/comment-date/index.php @@ -30,7 +30,7 @@ function render_block_core_comment_date( $attributes, $content, $block ) { $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) { // translators: %s: human-readable time difference. - $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( get_comment_date( 'U', $comment ) ) ); + $formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_comment_date( 'U', $comment ) ) ); } else { $formatted_date = get_comment_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $comment ); } diff --git a/packages/block-library/src/form/index.php b/packages/block-library/src/form/index.php index 8c63594671ca6..c887d46ad8618 100644 --- a/packages/block-library/src/form/index.php +++ b/packages/block-library/src/form/index.php @@ -92,7 +92,7 @@ function block_core_form_send_email() { // Start building the email content. $content = sprintf( /* translators: %s: The request URI. */ - __( 'Form submission from %1$s', 'gutenberg' ) . '
', + __( 'Form submission from %1$s' ) . '
', '' . get_bloginfo( 'name' ) . '' ); @@ -110,7 +110,7 @@ function block_core_form_send_email() { // Send the email. $result = wp_mail( str_replace( 'mailto:', '', $params['formAction'] ), - __( 'Form submission', 'gutenberg' ), + __( 'Form submission' ), $content ); diff --git a/packages/block-library/src/post-date/index.php b/packages/block-library/src/post-date/index.php index 3e79855aa25b7..79aa81e7f9c11 100644 --- a/packages/block-library/src/post-date/index.php +++ b/packages/block-library/src/post-date/index.php @@ -26,10 +26,10 @@ function render_block_core_post_date( $attributes, $content, $block ) { $post_timestamp = get_post_timestamp( $post_ID ); if ( $post_timestamp > time() ) { // translators: %s: human-readable time difference. - $formatted_date = sprintf( __( '%s from now', 'gutenberg' ), human_time_diff( $post_timestamp ) ); + $formatted_date = sprintf( __( '%s from now' ), human_time_diff( $post_timestamp ) ); } else { // translators: %s: human-readable time difference. - $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( $post_timestamp ) ); + $formatted_date = sprintf( __( '%s ago' ), human_time_diff( $post_timestamp ) ); } } else { $formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID ); @@ -52,7 +52,7 @@ function render_block_core_post_date( $attributes, $content, $block ) { if ( get_the_modified_date( 'Ymdhi', $post_ID ) > get_the_date( 'Ymdhi', $post_ID ) ) { if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) { // translators: %s: human-readable time difference. - $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( get_post_timestamp( $post_ID, 'modified' ) ) ); + $formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_post_timestamp( $post_ID, 'modified' ) ) ); } else { $formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID ); }