From 9db8cde82c64ef45edae6a28cce6aa7a4de57823 Mon Sep 17 00:00:00 2001 From: John-Henrique Date: Thu, 12 Jan 2012 05:23:41 -0300 Subject: [PATCH 1/2] Displaying correct currency symbol (Real of Brazil) --- readme.txt | 1 + woocommerce-core-functions.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 1b7d2ad088d..328b533323d 100644 --- a/readme.txt +++ b/readme.txt @@ -83,6 +83,7 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo == Changelog == = 1.4 = +* Displaying correct currency symbol (Real of Brazil) * Improved default theme * Support for multiple and stacked (compound) taxes * Locale options for country address formatting and checkout fields diff --git a/woocommerce-core-functions.php b/woocommerce-core-functions.php index 24a87dc910a..80021f4f7d8 100644 --- a/woocommerce-core-functions.php +++ b/woocommerce-core-functions.php @@ -112,8 +112,8 @@ function get_woocommerce_currency_symbol( $currency = '' ) { if (!$currency) $currency = get_option('woocommerce_currency'); $currency_symbol = ''; switch ($currency) : + case 'BRL' : $currency_symbol = 'R$'; break; // in Brazil the correct is R$ 0.00,00 case 'AUD' : - case 'BRL' : case 'CAD' : case 'MXN' : case 'NZD' : From 0d49d6e5a5c95d653433f11028b54652b058e78e Mon Sep 17 00:00:00 2001 From: John-Henrique Date: Thu, 12 Jan 2012 09:58:55 -0300 Subject: [PATCH 2/2] 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;