From 6081f3b61f7f48047fbf2e3a009072184646b95e Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Fri, 15 Aug 2014 16:08:43 -0300 Subject: [PATCH] fixed some missing and wrong textdomains --- includes/admin/meta-boxes/views/html-order-refund.php | 2 +- includes/admin/views/html-admin-page-status-report.php | 2 +- includes/api/class-wc-api-coupons.php | 8 ++++---- includes/api/class-wc-api-products.php | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/admin/meta-boxes/views/html-order-refund.php b/includes/admin/meta-boxes/views/html-order-refund.php index 836a6831fa2..4af7d8e0092 100644 --- a/includes/admin/meta-boxes/views/html-order-refund.php +++ b/includes/admin/meta-boxes/views/html-order-refund.php @@ -13,7 +13,7 @@ $who_refunded = new WP_User( $refund->post->post_author ); post_date ) ) ); if ( $who_refunded->exists() ){ - echo ' ' . esc_attr__( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '' . esc_attr( $who_refunded->display_name ) . '' ; + echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '' . esc_attr( $who_refunded->display_name ) . '' ; } ?> get_refund_reason() ) : ?> diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index fab6c9b509e..7f52b822247 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -458,7 +458,7 @@ if ( ! defined( 'ABSPATH' ) ) { $parent_theme = wp_get_theme( $active_theme->Template ); ?> - : + : Name; ?> diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 99b0be16aff..07e121313da 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -200,7 +200,7 @@ class WC_API_Coupons extends WC_API_Resource { // Check if coupon code is specified if ( ! isset( $data['code'] ) ) { - return new WP_Error( 'woocommerce_api_missing_coupon_code', sprintf( __( 'Missing parameter %s' ), 'code' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_missing_coupon_code', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'code' ), array( 'status' => 400 ) ); } $coupon_code = apply_filters( 'woocommerce_coupon_code', $data['code'] ); @@ -215,7 +215,7 @@ class WC_API_Coupons extends WC_API_Resource { ", $coupon_code ) ); if ( $coupon_found ) { - return new WP_Error( 'woocommerce_api_coupon_code_already_exists', __( 'The coupon code already exists' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_coupon_code_already_exists', __( 'The coupon code already exists', 'woocommerce' ), array( 'status' => 400 ) ); } $defaults = array( @@ -319,12 +319,12 @@ class WC_API_Coupons extends WC_API_Resource { ", $coupon_code, $id ) ); if ( $coupon_found ) { - return new WP_Error( 'woocommerce_api_coupon_code_already_exists', __( 'The coupon code already exists' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_coupon_code_already_exists', __( 'The coupon code already exists', 'woocommerce' ), array( 'status' => 400 ) ); } $id = wp_update_post( array( 'ID' => intval( $id ), 'post_title' => $coupon_code ) ); if ( 0 === $id ) { - return new WP_Error( 'woocommerce_api_cannot_update_coupon', __( 'Failed to update coupon', 'woocommerce'), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_cannot_update_coupon', __( 'Failed to update coupon', 'woocommerce' ), array( 'status' => 400 ) ); } } diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 4ab92bda5dc..7cda50de111 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -180,7 +180,7 @@ class WC_API_Products extends WC_API_Resource { // Check if product title is specified if ( ! isset( $data['title'] ) ) { - return new WP_Error( 'woocommerce_api_missing_product_title', sprintf( __( 'Missing parameter %s' ), 'title' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_missing_product_title', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'title' ), array( 'status' => 400 ) ); } // Check product type @@ -676,7 +676,7 @@ class WC_API_Products extends WC_API_Resource { if ( ! empty( $new_sku ) ) { $unique_sku = wc_product_has_unique_sku( $id, $new_sku ); if ( ! $unique_sku ) { - return new WP_Error( 'woocommerce_api_product_sku_already_exists', __( 'The SKU already exists on another product' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_product_sku_already_exists', __( 'The SKU already exists on another product', 'woocommerce' ), array( 'status' => 400 ) ); } else { update_post_meta( $id, '_sku', $new_sku ); } @@ -1117,7 +1117,7 @@ class WC_API_Products extends WC_API_Resource { if ( ! empty( $new_sku ) ) { $unique_sku = wc_product_has_unique_sku( $variation_id, $new_sku ); if ( ! $unique_sku ) { - return new WP_Error( 'woocommerce_api_product_sku_already_exists', __( 'The SKU already exists on another product' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_product_sku_already_exists', __( 'The SKU already exists on another product', 'woocommerce' ), array( 'status' => 400 ) ); } else { update_post_meta( $variation_id, '_sku', $new_sku ); } @@ -1587,7 +1587,7 @@ class WC_API_Products extends WC_API_Resource { // Check parsed URL if ( ! $parsed_url || ! is_array( $parsed_url ) ) { - return new WP_Error( 'woocommerce_api_invalid_product_image', sprintf( __( 'Invalid URL %s' ), $image_url ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_invalid_product_image', sprintf( __( 'Invalid URL %s', 'woocommerce' ), $image_url ), array( 'status' => 400 ) ); } // Ensure url is valid @@ -1599,7 +1599,7 @@ class WC_API_Products extends WC_API_Resource { ) ); if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'woocommerce_api_invalid_remote_product_image', sprintf( __( 'Error getting remote image %s' ), $image_url ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_invalid_remote_product_image', sprintf( __( 'Error getting remote image %s', 'woocommerce' ), $image_url ), array( 'status' => 400 ) ); } // Ensure we have a file name and type