From 3aa9b60b610b1417c09e504d6ecc5fca74dbd4f3 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 26 Oct 2018 18:16:14 -0300 Subject: [PATCH 1/4] Merged similar strings to reduce number of translateable strings --- includes/class-wc-countries.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index 6b7581cbd65..aa26d654724 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -662,7 +662,7 @@ class WC_Countries { 'priority' => 50, ), 'address_2' => array( - 'label' => __( 'Apartment, suite, or unit.', 'woocommerce' ), + 'label' => __( 'Apartment, suite, unit etc.', 'woocommerce' ), 'label_class' => 'screen-reader-text', 'placeholder' => esc_attr( $address_2_placeholder ), 'class' => array( 'form-row-wide', 'address-field' ), @@ -1012,12 +1012,12 @@ class WC_Countries { ), 'NG' => array( 'postcode' => array( - 'label' => __( 'Postcode', 'woocommerce' ), + 'label' => __( 'Postcode', 'woocommerce' ), 'required' => false, 'hidden' => true, ), 'state' => array( - 'label' => __( 'State', 'woocommerce' ), + 'label' => __( 'State', 'woocommerce' ), ), ), 'NZ' => array( From 47a6c32d5c9d03bf2d962515614049dcb96b61f1 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 26 Oct 2018 19:31:03 -0300 Subject: [PATCH 2/4] Remove duplicated string in reviews endpoint --- includes/api/class-wc-rest-product-reviews-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-wc-rest-product-reviews-controller.php b/includes/api/class-wc-rest-product-reviews-controller.php index 98e66734fb9..907c9e035d0 100644 --- a/includes/api/class-wc-rest-product-reviews-controller.php +++ b/includes/api/class-wc-rest-product-reviews-controller.php @@ -391,7 +391,7 @@ class WC_REST_Product_Reviews_Controller extends WC_REST_Controller { * Do not allow a comment to be created with missing or empty comment_content. See wp_handle_comment_submission(). */ if ( empty( $prepared_review['comment_content'] ) ) { - return new WP_Error( 'wc_rest_review_content_invalid', __( 'Invalid product review content.', 'woocommerce' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_rest_review_content_invalid', __( 'Invalid review content.', 'woocommerce' ), array( 'status' => 400 ) ); } // Setting remaining values before wp_insert_comment so we can use wp_allow_comment(). From 2be69a90a6dcd1cb29fa5048be8c8ebaec523cad Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 26 Oct 2018 20:08:24 -0300 Subject: [PATCH 3/4] Reduce number of duplicated strings --- includes/api/class-wc-rest-product-reviews-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-wc-rest-product-reviews-controller.php b/includes/api/class-wc-rest-product-reviews-controller.php index 907c9e035d0..602b1b5f8dd 100644 --- a/includes/api/class-wc-rest-product-reviews-controller.php +++ b/includes/api/class-wc-rest-product-reviews-controller.php @@ -926,7 +926,7 @@ class WC_REST_Product_Reviews_Controller extends WC_REST_Controller { $params['context']['default'] = 'view'; $params['after'] = array( - 'description' => __( 'Limit response to reviews published after a given ISO8601 compliant date.', 'woocommerce' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', ); From ccb3f3d82c18bfbdbe7ea7a6f1a2a13dc69c144e Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 26 Oct 2018 20:12:09 -0300 Subject: [PATCH 4/4] Normalize string in terms controller --- includes/abstracts/abstract-wc-rest-terms-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-rest-terms-controller.php b/includes/abstracts/abstract-wc-rest-terms-controller.php index 8f8cbccb213..54250750dc2 100644 --- a/includes/abstracts/abstract-wc-rest-terms-controller.php +++ b/includes/abstracts/abstract-wc-rest-terms-controller.php @@ -686,7 +686,7 @@ abstract class WC_REST_Terms_Controller extends WC_REST_Controller { $params['context']['default'] = 'view'; $params['exclude'] = array( - 'description' => __( 'Ensure result set excludes specific ids.', 'woocommerce' ), + 'description' => __( 'Ensure result set excludes specific IDs.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer',