Skip to content

Commit

Permalink
chore: update textdomain to wpgraphql-content-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mindctrl committed Feb 5, 2024
1 parent 4e94575 commit f615be5
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
14 changes: 7 additions & 7 deletions includes/Blocks/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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 ) {
Expand Down Expand Up @@ -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
),
Expand Down Expand Up @@ -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
),
Expand Down Expand Up @@ -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
),
Expand Down Expand Up @@ -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 );
},
Expand Down
2 changes: 1 addition & 1 deletion includes/Blocks/CoreImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
4 changes: 2 additions & 2 deletions includes/Field/BlockSupports/Anchor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down
26 changes: 13 additions & 13 deletions includes/Type/InterfaceType/EditorBlockInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand All @@ -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 );
},
Expand All @@ -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;
},
Expand All @@ -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'] );
Expand All @@ -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 );
},
Expand Down
6 changes: 3 additions & 3 deletions includes/Type/InterfaceType/PostTypeBlockInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand All @@ -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,
Expand All @@ -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 ) {
Expand Down
4 changes: 2 additions & 2 deletions includes/Type/Scalar/Scalar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
},
Expand All @@ -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 );
},
Expand Down
8 changes: 4 additions & 4 deletions includes/WPGraphQLContentBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

/**
Expand All @@ -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' );
}

/**
Expand Down Expand Up @@ -116,7 +116,7 @@ static function () {
'<p>%s</p>' .
'</div>',
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 <a target="_blank" href="https://github.com/wpengine/wp-graphql-content-blocks/releases">GitHub Releases tab.</a>', '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 <a target="_blank" href="https://github.com/wpengine/wp-graphql-content-blocks/releases">GitHub Releases tab.</a>', 'wpgraphql-content-blocks' )
)
);
}
Expand All @@ -138,7 +138,7 @@ static function () {
'<div class="notice notice-error is-dismissible">' .
'<p>%s</p>' .
'</div>',
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' )
);
}
);
Expand Down
2 changes: 1 addition & 1 deletion includes/updates/update-callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@ function filter_semver_notice_text( $notice_text, $plugin_filename ) {
if ( WPGRAPHQL_CONTENT_BLOCKS_PATH !== $plugin_filename ) {
return $notice_text;
}
return '<br><br>' . __( '<b>THIS UPDATE MAY CONTAIN BREAKING CHANGES:</b> This plugin uses Semantic Versioning, and this new version is a major release. Please review the changelog before updating.', 'wp-graphql-content-blocks' );
return '<br><br>' . __( '<b>THIS UPDATE MAY CONTAIN BREAKING CHANGES:</b> This plugin uses Semantic Versioning, and this new version is a major release. Please review the changelog before updating.', 'wpgraphql-content-blocks' );
}
6 changes: 3 additions & 3 deletions includes/updates/update-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="%1$s">%2$s</a> 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' )
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion wpgraphql-content-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f615be5

Please sign in to comment.