Skip to content

Commit

Permalink
Normalize ellipsis usage
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed May 12, 2022
1 parent 8682539 commit 2beaafe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions includes/classes/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();

Expand All @@ -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();

Expand All @@ -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();

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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 );
Expand Down
12 changes: 6 additions & 6 deletions includes/classes/IndexHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,17 @@ 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']
)
);
} 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(
Expand Down Expand Up @@ -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'] ) )
),
Expand Down Expand Up @@ -877,15 +877,15 @@ 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'] ) )
)
);
} else {
$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'] ) )
)
);
Expand Down

0 comments on commit 2beaafe

Please sign in to comment.