From 0d49d6e5a5c95d653433f11028b54652b058e78e Mon Sep 17 00:00:00 2001 From: John-Henrique Date: Thu, 12 Jan 2012 09:58:55 -0300 Subject: [PATCH] Added translation support to product list #494 --- admin/post-types/product.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/admin/post-types/product.php b/admin/post-types/product.php index 55687fc12d7..2168c9b3699 100644 --- a/admin/post-types/product.php +++ b/admin/post-types/product.php @@ -131,7 +131,21 @@ function woocommerce_custom_product_columns($column) { endif; break; case "product_type" : - echo ucwords($product->product_type); + + // Its was dynamic but did not support the translations + if( $product->product_type == 'grouped' ): + echo __('Grouped product', 'woocommerce'); + elseif ( $product->product_type == 'external' ): + echo __('External/Affiliate product', 'woocommerce'); + elseif ( $product->product_type == 'simple' ): + echo __('Simple product', 'woocommerce'); + elseif ( $product->product_type == 'variable' ): + echo __('Variable', 'woocommerce'); + else: + // Assuming that we have other types in future + echo ucwords($product->product_type); + endif; + break; case "product_date" : if ( '0000-00-00 00:00:00' == $post->post_date ) : @@ -164,8 +178,14 @@ function woocommerce_custom_product_columns($column) { _e( 'Last Modified', 'woocommerce' ); endif; - if ( $this_data = $product->visibility ) : - echo '
' . ucfirst($this_data); + /** + * show hidden visible product on colum Date + * Assuming that we have only show and hidden status + */ + if ( $product->visibility == 'hidden' ) : + echo '
'. __('Hidden', 'woocommerce'); + else: + echo '
'. __('Visible', 'woocommerce'); endif; break;