Fix decimal ratings not correctly displayed (https://github.com/woocommerce/woocommerce-blocks/pull/2507)
* Fix decimal ratings not correctly displayed * Fix aria label rounding ratings
This commit is contained in:
parent
8f2003df4b
commit
0dc7e9e6f1
|
@ -19,7 +19,7 @@ const ProductRating = ( { className, product } ) => {
|
|||
};
|
||||
|
||||
const ratingText = sprintf(
|
||||
__( 'Rated %d out of 5', 'woo-gutenberg-products-block' ),
|
||||
__( 'Rated %f out of 5', 'woo-gutenberg-products-block' ),
|
||||
rating
|
||||
);
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@
|
|||
position: absolute;
|
||||
opacity: 0.5;
|
||||
color: #aaa;
|
||||
white-space: nowrap;
|
||||
}
|
||||
span {
|
||||
overflow: hidden;
|
||||
|
@ -211,6 +212,7 @@
|
|||
right: 0;
|
||||
position: absolute;
|
||||
color: #000;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ function getReviewRating( review ) {
|
|||
<span style={ starStyle }>
|
||||
{ sprintf(
|
||||
__(
|
||||
'Rated %d out of 5',
|
||||
'Rated %f out of 5',
|
||||
'woo-gutenberg-products-block'
|
||||
),
|
||||
rating
|
||||
|
|
Loading…
Reference in New Issue