From 2beaafeba27cf06f90c45e47ca8155b516f5f8dc Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Thu, 12 May 2022 09:55:14 -0300 Subject: [PATCH] Normalize ellipsis usage --- includes/classes/Command.php | 16 ++++++++-------- includes/classes/IndexHelper.php | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/includes/classes/Command.php b/includes/classes/Command.php index 1973bb8ccb..7e2c3fd15b 100644 --- a/includes/classes/Command.php +++ b/includes/classes/Command.php @@ -261,7 +261,7 @@ private function put_mapping_helper( $args, $assoc_args ) { continue; } - WP_CLI::line( sprintf( esc_html__( 'Adding %1$s mapping for site %2$d...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ), (int) $site['blog_id'] ) ); + WP_CLI::line( sprintf( esc_html__( 'Adding %1$s mapping for site %2$d…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ), (int) $site['blog_id'] ) ); $indexable->delete_index(); $result = $indexable->put_mapping(); @@ -296,7 +296,7 @@ private function put_mapping_helper( $args, $assoc_args ) { continue; } - WP_CLI::line( sprintf( esc_html__( 'Adding %s mapping...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); + WP_CLI::line( sprintf( esc_html__( 'Adding %s mapping…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); $indexable->delete_index(); $result = $indexable->put_mapping(); @@ -332,7 +332,7 @@ private function put_mapping_helper( $args, $assoc_args ) { continue; } - WP_CLI::line( sprintf( esc_html__( 'Adding %s mapping...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); + WP_CLI::line( sprintf( esc_html__( 'Adding %s mapping…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); $indexable->delete_index(); $result = $indexable->put_mapping(); @@ -507,7 +507,7 @@ public function delete_index( $args, $assoc_args ) { foreach ( $non_global_indexable_objects as $indexable ) { - WP_CLI::line( sprintf( esc_html__( 'Deleting %1$s index for site %2$d...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ), (int) $site['blog_id'] ) ); + WP_CLI::line( sprintf( esc_html__( 'Deleting %1$s index for site %2$d…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ), (int) $site['blog_id'] ) ); $result = $indexable->delete_index(); @@ -522,7 +522,7 @@ public function delete_index( $args, $assoc_args ) { } } else { foreach ( $non_global_indexable_objects as $indexable ) { - WP_CLI::line( sprintf( esc_html__( 'Deleting index for %s...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) ); + WP_CLI::line( sprintf( esc_html__( 'Deleting index for %s…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) ); $result = $indexable->delete_index(); @@ -535,7 +535,7 @@ public function delete_index( $args, $assoc_args ) { } foreach ( $global_indexable_objects as $indexable ) { - WP_CLI::line( sprintf( esc_html__( 'Deleting index for %s...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) ); + WP_CLI::line( sprintf( esc_html__( 'Deleting index for %s…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) ); $result = $indexable->delete_index(); @@ -564,7 +564,7 @@ public function recreate_network_alias( $args, $assoc_args ) { $indexables = Indexables::factory()->get_all( false ); foreach ( $indexables as $indexable ) { - WP_CLI::line( sprintf( esc_html__( 'Recreating %s network alias...', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); + WP_CLI::line( sprintf( esc_html__( 'Recreating %s network alias…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['singular'] ) ) ) ); $indexable->delete_network_alias(); @@ -1132,7 +1132,7 @@ public function stop_indexing( $args, $assoc_args ) { if ( empty( \ElasticPress\Utils\get_indexing_status() ) ) { WP_CLI::warning( esc_html__( 'There is no indexing operation running.', 'elasticpress' ) ); } else { - WP_CLI::line( esc_html__( 'Stopping indexing...', 'elasticpress' ) ); + WP_CLI::line( esc_html__( 'Stopping indexing…', 'elasticpress' ) ); if ( isset( $indexing_status['method'] ) && 'cli' === $indexing_status['method'] ) { set_transient( 'ep_wpcli_sync_interrupted', true, MINUTE_IN_SECONDS ); diff --git a/includes/classes/IndexHelper.php b/includes/classes/IndexHelper.php index f9a2fc87be..e81913bf8d 100644 --- a/includes/classes/IndexHelper.php +++ b/includes/classes/IndexHelper.php @@ -287,7 +287,7 @@ protected function process_sync_item() { $this->output_success( sprintf( /* translators: 1: Indexable name, 2: Site ID */ - esc_html__( 'Indexing %1$s on site %2$d...', 'elasticpress' ), + esc_html__( 'Indexing %1$s on site %2$d…', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ), $this->index_meta['current_sync_item']['blog_id'] ) @@ -295,9 +295,9 @@ protected function process_sync_item() { } else { $message_string = ( $indexable->global ) ? /* translators: 1: Indexable name */ - esc_html__( 'Indexing %1$s (globally)...', 'elasticpress' ) : + esc_html__( 'Indexing %1$s (globally)…', 'elasticpress' ) : /* translators: 1: Indexable name */ - esc_html__( 'Indexing %1$s...', 'elasticpress' ); + esc_html__( 'Indexing %1$s…', 'elasticpress' ); $this->output_success( sprintf( @@ -410,7 +410,7 @@ protected function index_objects() { $this->output( sprintf( /* translators: 1. Number of objects skipped 2. Indexable type */ - esc_html__( 'Skipping %1$d %2$s...', 'elasticpress' ), + esc_html__( 'Skipping %1$d %2$s…', 'elasticpress' ), $this->index_meta['from'], esc_html( strtolower( $indexable->labels['plural'] ) ) ), @@ -877,7 +877,7 @@ protected function create_network_alias() { $this->output_success( sprintf( /* translators: 1: Indexable name */ - esc_html__( 'Network alias created for %1$s ...', 'elasticpress' ), + esc_html__( 'Network alias created for %1$s', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) ); @@ -885,7 +885,7 @@ protected function create_network_alias() { $this->output_error( sprintf( /* translators: 1: Indexable name */ - esc_html__( 'Network alias creation failed for %1$s ...', 'elasticpress' ), + esc_html__( 'Network alias creation failed for %1$s', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ) ) );