This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
atomic/components/product/button
base/components/checkbox-list Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ const ProductButton = ( { product, className } ) => {
103103 const getButtonText = ( ) => {
104104 if ( Number . isFinite ( cartQuantity ) && addedToCart ) {
105105 return sprintf (
106+ // translators: %s number of products in cart.
106107 _n (
107108 '%d in cart' ,
108109 '%d in cart' ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ const CheckboxList = ( {
3939
4040 const renderedShowMore = useMemo ( ( ) => {
4141 const optionCount = options . length ;
42+ const remainingOptionsCount = optionCount - limit ;
4243 return (
4344 ! showExpanded && (
4445 < li key = "show-more" className = "show-more" >
@@ -51,21 +52,21 @@ const CheckboxList = ( {
5152 _n (
5253 'Show %s more option' ,
5354 'Show %s more options' ,
54- optionCount - limit ,
55+ remainingOptionsCount ,
5556 'woo-gutenberg-products-block'
5657 ) ,
57- optionCount - limit
58+ remainingOptionsCount
5859 ) }
5960 >
60- { // translators: %s number of options to reveal.
61- sprintf (
61+ { sprintf (
62+ // translators: %s number of options to reveal.
6263 _n (
6364 'Show %s more' ,
6465 'Show %s more' ,
65- optionCount - limit ,
66+ remainingOptionsCount ,
6667 'woo-gutenberg-products-block'
6768 ) ,
68- optionCount - limit
69+ remainingOptionsCount
6970 ) }
7071 </ button >
7172 </ li >
You can’t perform that action at this time.
0 commit comments