From f615be5c9a44341e9084da14296fd6860301d362 Mon Sep 17 00:00:00 2001 From: John Parris Date: Mon, 5 Feb 2024 13:44:08 -0500 Subject: [PATCH] chore: update textdomain to wpgraphql-content-blocks --- includes/Blocks/Block.php | 14 +++++----- includes/Blocks/CoreImage.php | 2 +- includes/Field/BlockSupports/Anchor.php | 4 +-- .../InterfaceType/EditorBlockInterface.php | 26 +++++++++---------- .../InterfaceType/PostTypeBlockInterface.php | 6 ++--- includes/Type/Scalar/Scalar.php | 4 +-- includes/WPGraphQLContentBlocks.php | 8 +++--- includes/updates/update-callbacks.php | 2 +- includes/updates/update-functions.php | 6 ++--- wpgraphql-content-blocks.php | 2 +- 10 files changed, 37 insertions(+), 37 deletions(-) diff --git a/includes/Blocks/Block.php b/includes/Blocks/Block.php index 3aaf7d02..1d26be2b 100644 --- a/includes/Blocks/Block.php +++ b/includes/Blocks/Block.php @@ -96,7 +96,7 @@ private function register_block_attributes_as_fields(): void { [ 'description' => sprintf( // translators: %s is the block type name. - __( 'Attributes of the %s Block Type', 'wp-graphql-content-blocks' ), + __( 'Attributes of the %s Block Type', 'wpgraphql-content-blocks' ), $this->type_name ), 'interfaces' => $this->get_block_attributes_interfaces(), @@ -111,7 +111,7 @@ private function register_block_attributes_as_fields(): void { 'type' => $block_attribute_type_name, 'description' => sprintf( // translators: %s is the block type name. - __( 'Attributes of the %s Block Type', 'wp-graphql-content-blocks' ), + __( 'Attributes of the %s Block Type', 'wpgraphql-content-blocks' ), $this->type_name ), 'resolve' => static function ( $block ) { @@ -209,7 +209,7 @@ private function get_block_attribute_fields( ?array $block_attributes, $prefix = 'type' => $graphql_type, 'description' => sprintf( // translators: %1$s is the attribute name, %2$s is the block name. - __( 'The "%1$s" field on the "%2$s" block or block attributes', 'wp-graphql-content-blocks' ), + __( 'The "%1$s" field on the "%2$s" block or block attributes', 'wpgraphql-content-blocks' ), $attribute_name, $prefix ), @@ -245,7 +245,7 @@ private function get_query_type( string $name, array $query, string $prefix ): s 'fields' => $fields, 'description' => sprintf( // translators: %1$s is the attribute name, %2$s is the block attributes field. - __( 'The "%1$s" field on the "%2$s" block attribute field', 'wp-graphql-content-blocks' ), + __( 'The "%1$s" field on the "%2$s" block attribute field', 'wpgraphql-content-blocks' ), $type, $prefix ), @@ -275,7 +275,7 @@ private function create_attributes_fields( $attributes, $prefix ): array { 'type' => $type, 'description' => sprintf( // translators: %1$s is the attribute name, %2$s is the block attributes field. - __( 'The "%1$s" field on the "%2$s" block attribute field', 'wp-graphql-content-blocks' ), + __( 'The "%1$s" field on the "%2$s" block attribute field', 'wpgraphql-content-blocks' ), $name, $prefix ), @@ -341,13 +341,13 @@ private function register_type(): void { register_graphql_object_type( $this->type_name, [ - 'description' => __( 'A block used for editing the site', 'wp-graphql-content-blocks' ), + 'description' => __( 'A block used for editing the site', 'wpgraphql-content-blocks' ), 'interfaces' => $this->get_block_interfaces(), 'eagerlyLoadType' => true, 'fields' => [ 'name' => [ 'type' => 'String', - 'description' => __( 'The name of the block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The name of the block', 'wpgraphql-content-blocks' ), 'resolve' => function ( $block ) { return $this->resolve( $block ); }, diff --git a/includes/Blocks/CoreImage.php b/includes/Blocks/CoreImage.php index caf6c81a..b1d5b8e0 100644 --- a/includes/Blocks/CoreImage.php +++ b/includes/Blocks/CoreImage.php @@ -51,7 +51,7 @@ public function __construct( WP_Block_Type $block, Registry $block_registry ) { 'type' => 'MediaDetails', 'description' => sprintf( // translators: %s is the block type name. - __( 'Media Details of the %s Block Type', 'wp-graphql-content-blocks' ), + __( 'Media Details of the %s Block Type', 'wpgraphql-content-blocks' ), $this->type_name ), 'resolve' => static function ( $block ) { diff --git a/includes/Field/BlockSupports/Anchor.php b/includes/Field/BlockSupports/Anchor.php index 6011ed21..3d1d522e 100644 --- a/includes/Field/BlockSupports/Anchor.php +++ b/includes/Field/BlockSupports/Anchor.php @@ -21,11 +21,11 @@ public static function register(): void { register_graphql_interface_type( 'BlockWithSupportsAnchor', [ - 'description' => __( 'Block that supports Anchor field', 'wp-graphql-content-blocks' ), + 'description' => __( 'Block that supports Anchor field', 'wpgraphql-content-blocks' ), 'fields' => [ 'anchor' => [ 'type' => 'string', - 'description' => __( 'The anchor field for the block.', 'wp-graphql-content-blocks' ), + 'description' => __( 'The anchor field for the block.', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { $rendered_block = wp_unslash( render_block( $block ) ); if ( empty( $rendered_block ) ) { diff --git a/includes/Type/InterfaceType/EditorBlockInterface.php b/includes/Type/InterfaceType/EditorBlockInterface.php index 1157fbd9..d21631a2 100644 --- a/includes/Type/InterfaceType/EditorBlockInterface.php +++ b/includes/Type/InterfaceType/EditorBlockInterface.php @@ -43,7 +43,7 @@ public static function register_type(): void { register_graphql_interface_type( 'NodeWithEditorBlocks', [ - 'description' => __( 'Node that has content blocks associated with it', 'wp-graphql-content-blocks' ), + 'description' => __( 'Node that has content blocks associated with it', 'wpgraphql-content-blocks' ), 'eagerlyLoadType' => true, 'fields' => [ 'editorBlocks' => [ @@ -52,11 +52,11 @@ public static function register_type(): void { ], 'args' => [ 'flat' => [ - 'description' => __( 'Returns the list of blocks as a flat list if true', 'wp-graphql-content-blocks' ), + 'description' => __( 'Returns the list of blocks as a flat list if true', 'wpgraphql-content-blocks' ), 'type' => 'Boolean', ], ], - 'description' => __( 'List of editor blocks', 'wp-graphql-content-blocks' ), + 'description' => __( 'List of editor blocks', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $node, $args ) { return ContentBlocksResolver::resolve_content_blocks( $node, $args ); }, @@ -70,43 +70,43 @@ public static function register_type(): void { 'EditorBlock', [ 'eagerlyLoadType' => true, - 'description' => __( 'Blocks that can be edited to create content and layouts', 'wp-graphql-content-blocks' ), + 'description' => __( 'Blocks that can be edited to create content and layouts', 'wpgraphql-content-blocks' ), 'fields' => [ 'clientId' => [ 'type' => 'String', - 'description' => __( 'The id of the Block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The id of the Block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( $block['clientId'] ) ? $block['clientId'] : uniqid(); }, ], 'parentClientId' => [ 'type' => 'String', - 'description' => __( 'The parent id of the Block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The parent id of the Block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( $block['parentClientId'] ) ? $block['parentClientId'] : null; }, ], 'name' => [ 'type' => 'String', - 'description' => __( 'The name of the Block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The name of the Block', 'wpgraphql-content-blocks' ), ], 'blockEditorCategoryName' => [ 'type' => 'String', - 'description' => __( 'The name of the category the Block belongs to', 'wp-graphql-content-blocks' ), + 'description' => __( 'The name of the category the Block belongs to', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( self::get_block( $block )->category ) ? self::get_block( $block )->category : null; }, ], 'isDynamic' => [ 'type' => [ 'non_null' => 'Boolean' ], - 'description' => __( 'Whether the block is Dynamic (server rendered)', 'wp-graphql-content-blocks' ), + 'description' => __( 'Whether the block is Dynamic (server rendered)', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( self::get_block( $block )->render_callback ); }, ], 'apiVersion' => [ 'type' => 'Integer', - 'description' => __( 'The API version of the Gutenberg Block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The API version of the Gutenberg Block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( self::get_block( $block )->api_version ) && absint( self::get_block( $block )->api_version ) ? absint( self::get_block( $block )->api_version ) : 2; }, @@ -115,14 +115,14 @@ public static function register_type(): void { 'type' => [ 'list_of' => 'EditorBlock', ], - 'description' => __( 'The inner blocks of the Block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The inner blocks of the Block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return isset( $block['innerBlocks'] ) && is_array( $block['innerBlocks'] ) ? $block['innerBlocks'] : []; }, ], 'cssClassNames' => [ 'type' => [ 'list_of' => 'String' ], - 'description' => __( 'CSS Classnames to apply to the block', 'wp-graphql-content-blocks' ), + 'description' => __( 'CSS Classnames to apply to the block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { if ( isset( $block['attrs']['className'] ) ) { return explode( ' ', $block['attrs']['className'] ); @@ -133,7 +133,7 @@ public static function register_type(): void { ], 'renderedHtml' => [ 'type' => 'String', - 'description' => __( 'The rendered HTML for the block', 'wp-graphql-content-blocks' ), + 'description' => __( 'The rendered HTML for the block', 'wpgraphql-content-blocks' ), 'resolve' => static function ( $block ) { return render_block( $block ); }, diff --git a/includes/Type/InterfaceType/PostTypeBlockInterface.php b/includes/Type/InterfaceType/PostTypeBlockInterface.php index 72d11841..6ba39070 100644 --- a/includes/Type/InterfaceType/PostTypeBlockInterface.php +++ b/includes/Type/InterfaceType/PostTypeBlockInterface.php @@ -26,7 +26,7 @@ public static function register_type( string $post_type, array $block_names = [] [ 'description' => sprintf( // translators: EditorBlock Interface for %s Block Type. - __( 'EditorBlock Interface for %s Block Type', 'wp-graphql-content-blocks' ), + __( 'EditorBlock Interface for %s Block Type', 'wpgraphql-content-blocks' ), ucfirst( $post_type ) ), 'interfaces' => [ 'EditorBlock' ], @@ -52,7 +52,7 @@ public static function register_type( string $post_type, array $block_names = [] [ 'description' => sprintf( // translators: %s is the post type. - __( 'Node that has %s content blocks associated with it', 'wp-graphql-content-blocks' ), + __( 'Node that has %s content blocks associated with it', 'wpgraphql-content-blocks' ), $post_type ), 'eagerlyLoadType' => true, @@ -69,7 +69,7 @@ public static function register_type( string $post_type, array $block_names = [] ], 'description' => sprintf( // translators: %s is the post type. - __( 'List of %s editor blocks', 'wp-graphql-content-blocks' ), + __( 'List of %s editor blocks', 'wpgraphql-content-blocks' ), $post_type ), 'resolve' => static function ( $node, $args ) use ( $block_names ) { diff --git a/includes/Type/Scalar/Scalar.php b/includes/Type/Scalar/Scalar.php index 010a5cf1..f15ec388 100644 --- a/includes/Type/Scalar/Scalar.php +++ b/includes/Type/Scalar/Scalar.php @@ -18,7 +18,7 @@ public function init(): void { register_graphql_scalar( 'BlockAttributesObject', [ - 'description' => __( 'Generic Object Scalar Type', 'wp-graphql-content-blocks' ), + 'description' => __( 'Generic Object Scalar Type', 'wpgraphql-content-blocks' ), 'serialize' => static function ( $value ) { return wp_json_encode( $value ); }, @@ -27,7 +27,7 @@ public function init(): void { register_graphql_scalar( 'BlockAttributesArray', [ - 'description' => __( 'Generic Array Scalar Type', 'wp-graphql-content-blocks' ), + 'description' => __( 'Generic Array Scalar Type', 'wpgraphql-content-blocks' ), 'serialize' => static function ( $value ) { return wp_json_encode( $value ); }, diff --git a/includes/WPGraphQLContentBlocks.php b/includes/WPGraphQLContentBlocks.php index 824a7da4..35210306 100644 --- a/includes/WPGraphQLContentBlocks.php +++ b/includes/WPGraphQLContentBlocks.php @@ -50,7 +50,7 @@ public static function instance() { */ public function __clone() { // Cloning instances of the class is forbidden. - _doing_it_wrong( __FUNCTION__, esc_html__( 'The WPGraphQLContentBlocks class should not be cloned.', 'wp-graphql-content-blocks' ), '0.0.1' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'The WPGraphQLContentBlocks class should not be cloned.', 'wpgraphql-content-blocks' ), '0.0.1' ); } /** @@ -61,7 +61,7 @@ public function __clone() { */ public function __wakeup() { // De-serializing instances of the class is forbidden. - _doing_it_wrong( __FUNCTION__, esc_html__( 'De-serializing instances of the WPGraphQLContentBlocks class is not allowed', 'wp-graphql-content-blocks' ), '0.0.1' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'De-serializing instances of the WPGraphQLContentBlocks class is not allowed', 'wpgraphql-content-blocks' ), '0.0.1' ); } /** @@ -116,7 +116,7 @@ static function () { '

%s

' . '', wp_kses_post( - __( 'WPGraphQL Content Blocks appears to have been installed without its dependencies. If you meant to download the source code, you can run `composer install` to install dependencies. If you are looking for the production version of the plugin, you can download it from the GitHub Releases tab.', 'wp-graphql-content-blocks' ) + __( 'WPGraphQL Content Blocks appears to have been installed without its dependencies. If you meant to download the source code, you can run `composer install` to install dependencies. If you are looking for the production version of the plugin, you can download it from the GitHub Releases tab.', 'wpgraphql-content-blocks' ) ) ); } @@ -138,7 +138,7 @@ static function () { '
' . '

%s

' . '
', - esc_html__( 'WPGraphQL Content Blocks will not work without WPGraphQL installed and active.', 'wp-graphql-content-blocks' ) + esc_html__( 'WPGraphQL Content Blocks will not work without WPGraphQL installed and active.', 'wpgraphql-content-blocks' ) ); } ); diff --git a/includes/updates/update-callbacks.php b/includes/updates/update-callbacks.php index e02f4cd1..753e5e6b 100644 --- a/includes/updates/update-callbacks.php +++ b/includes/updates/update-callbacks.php @@ -174,5 +174,5 @@ function filter_semver_notice_text( $notice_text, $plugin_filename ) { if ( WPGRAPHQL_CONTENT_BLOCKS_PATH !== $plugin_filename ) { return $notice_text; } - return '

' . __( 'THIS UPDATE MAY CONTAIN BREAKING CHANGES: This plugin uses Semantic Versioning, and this new version is a major release. Please review the changelog before updating.', 'wp-graphql-content-blocks' ); + return '

' . __( 'THIS UPDATE MAY CONTAIN BREAKING CHANGES: This plugin uses Semantic Versioning, and this new version is a major release. Please review the changelog before updating.', 'wpgraphql-content-blocks' ); } \ No newline at end of file diff --git a/includes/updates/update-functions.php b/includes/updates/update-functions.php index a3ba01a9..1d2aa9bf 100644 --- a/includes/updates/update-functions.php +++ b/includes/updates/update-functions.php @@ -120,17 +120,17 @@ function get_remote_plugin_info() { function get_api_error_text( string $reason ): string { switch ( $reason ) { case 'key-unknown': - return __( 'The product you requested information for is unknown. Please contact support.', 'wp-graphql-content-blocks' ); + return __( 'The product you requested information for is unknown. Please contact support.', 'wpgraphql-content-blocks' ); default: return sprintf( /* translators: %1$s: Link to GitHub issues. %2$s: The text that is linked. */ __( 'WPGraphQL Content Blocks encountered an unknown error connecting to the update service. This issue could be temporary. Please %2$s if this error persists.', - 'wp-graphql-content-blocks' + 'wpgraphql-content-blocks' ), 'https://github.com/wpengine/wp-graphql-content-blocks/issues', - esc_html__( 'contact support', 'wp-graphql-content-blocks' ) + esc_html__( 'contact support', 'wpgraphql-content-blocks' ) ); } } diff --git a/wpgraphql-content-blocks.php b/wpgraphql-content-blocks.php index 9ec5ab83..7e201ef4 100644 --- a/wpgraphql-content-blocks.php +++ b/wpgraphql-content-blocks.php @@ -6,7 +6,7 @@ * Author URI: https://wpengine.com/ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html - * Text Domain: wp-graphql-content-blocks + * Text Domain: wpgraphql-content-blocks * Domain Path: /languages * Version: 3.0.0 * Requires PHP: 7.4