Merge pull request #18365 from woocommerce/fix/18352

Add appropriate column widths and fix up price method for consistentcy.
This commit is contained in:
Claudiu Lodromanean 2018-01-05 10:48:28 -08:00 committed by GitHub
commit e201f6daf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2509,8 +2509,17 @@ table.wp-list-table {
color: #999; color: #999;
} }
.column-sku {
width: 10%;
}
.column-price {
width: 10ch;
}
.column-is_in_stock { .column-is_in_stock {
text-align: left !important; text-align: left !important;
width: 12ch;
} }
span.wc-image, span.wc-image,

View File

@ -4,7 +4,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WooCommerce 3.3.0-beta.2\n" "Project-Id-Version: WooCommerce 3.3.0-beta.2\n"
"Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n" "Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
"POT-Creation-Date: 2018-01-05 18:09:45+00:00\n" "POT-Creation-Date: 2018-01-05 18:47:10+00:00\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -5816,7 +5816,7 @@ msgid "via %s"
msgstr "" msgstr ""
#: includes/abstracts/abstract-wc-order.php:1686 #: includes/abstracts/abstract-wc-order.php:1686
#: includes/class-wc-cart.php:1424 includes/class-wc-product-grouped.php:119 #: includes/class-wc-cart.php:1424 includes/class-wc-product-grouped.php:124
msgid "Free!" msgid "Free!"
msgstr "" msgstr ""
@ -24697,17 +24697,6 @@ msgctxt "Order status"
msgid "Failed" msgid "Failed"
msgstr "" msgstr ""
#: includes/class-wc-product-grouped.php:115
msgctxt "Price range: from-to"
msgid "%1$s–%2$s"
msgstr ""
#: includes/wc-formatting-functions.php:1164
#. translators: 1: price from 2: price to
msgctxt "Price range: from-to"
msgid "%1$s – %2$s"
msgstr ""
#: includes/wc-account-functions.php:68 #: includes/wc-account-functions.php:68
msgctxt "edit-address-slug" msgctxt "edit-address-slug"
msgid "billing" msgid "billing"
@ -24725,6 +24714,12 @@ msgid_plural "Shipping %d"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: includes/wc-formatting-functions.php:1164
#. translators: 1: price from 2: price to
msgctxt "Price range: from-to"
msgid "%1$s – %2$s"
msgstr ""
#: includes/wc-template-functions.php:1689 #: includes/wc-template-functions.php:1689
msgctxt "breadcrumb" msgctxt "breadcrumb"
msgid "Home" msgid "Home"

View File

@ -112,8 +112,13 @@ class WC_Product_Grouped extends WC_Product {
} }
if ( '' !== $min_price ) { if ( '' !== $min_price ) {
$price = $min_price !== $max_price ? sprintf( _x( '%1$s–%2$s', 'Price range: from-to', 'woocommerce' ), wc_price( $min_price ), wc_price( $max_price ) ) : wc_price( $min_price ); if ( $min_price !== $max_price ) {
$is_free = ( 0 == $min_price && 0 == $max_price ); $price = wc_format_price_range( $min_price, $max_price );
} else {
$price = wc_price( $min_price );
}
$is_free = 0 === $min_price && 0 === $max_price;
if ( $is_free ) { if ( $is_free ) {
$price = apply_filters( 'woocommerce_grouped_free_price_html', __( 'Free!', 'woocommerce' ), $this ); $price = apply_filters( 'woocommerce_grouped_free_price_html', __( 'Free!', 'woocommerce' ), $this );