Skip to content

Commit 4dde6e3

Browse files
committed
Add increase/decrease quantity translations
1 parent 9da9c3d commit 4dde6e3

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

lib/kits/core-ui/components/common/offer-overview.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ const defaultTemplate = `\
8282
{{#showQuantityButtons}}
8383
<div id="sgn-offer-product-quantity-{{id}}" class="sgn-offer-product-quantity">
8484
<div class="sgn-offer-product-quantity-content">
85-
<button id="sgn-offer-product-quantity-minus-{{id}}" class="sgn-offer-product-quantity-minus" aria-label="Decrease quantity">
85+
<button id="sgn-offer-product-quantity-minus-{{id}}" class="sgn-offer-product-quantity-minus" aria-label="{{translations.decreaseQuantity}}">
8686
<svg xmlns="http://www.w3.org/2000/svg" class="bi bi-minus-circle-fill" viewBox="0 0 448 512"><path d="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"/></svg>
8787
</button>
8888
<input type="text" id="sgn-offer-product-quantity-text-{{id}}" class="sgn-offer-product-quantity-text" value="{{quantity}}" disabled/>
89-
<button id="sgn-offer-product-quantity-plus-{{id}}" class="sgn-offer-product-quantity-plus" aria-label="Increase quantity">
89+
<button id="sgn-offer-product-quantity-plus-{{id}}" class="sgn-offer-product-quantity-plus" aria-label="{{translations.increaseQuantity}}">
9090
<svg xmlns="http://www.w3.org/2000/svg" class="bi bi-plus-circle-fill" viewBox="0 0 448 512"><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"/></svg>
9191
</button>
9292
</div>
@@ -135,7 +135,13 @@ const OfferOverview = ({
135135
visitWebshopLink: translate('publication_viewer_visit_webshop_link'),
136136
priceFrom: translate('publication_viewer_offer_price_from'),
137137
validFrom: translate('publication_viewer_offer_valid_from'),
138-
close: translate('publication_viewer_close_label')
138+
close: translate('publication_viewer_close_label'),
139+
increaseQuantity: translate(
140+
'publication_viewer_offer_increase_quantity'
141+
),
142+
decreaseQuantity: translate(
143+
'publication_viewer_offer_decrease_quantity'
144+
)
139145
};
140146

141147
const render = async () => {

locales/da_DK.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ export default {
2424
publication_viewer_offer_price_from: 'Fra',
2525
publication_viewer_offer_price_for: 'for',
2626
publication_viewer_offer_valid_from: 'Gælder kun fra d. ',
27-
publication_viewer_no_product_message: 'Ingen produkt detaljer'
27+
publication_viewer_no_product_message: 'Ingen produkt detaljer',
28+
publication_viewer_offer_increase_quantity: 'Øg antal',
29+
publication_viewer_offer_decrease_quantity: 'Mindsk antal'
2830
};

locales/en_US.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ export default {
2424
publication_viewer_offer_price_from: 'From',
2525
publication_viewer_offer_price_for: 'for',
2626
publication_viewer_offer_valid_from: 'Valid from ',
27-
publication_viewer_no_product_message: 'No product details'
27+
publication_viewer_no_product_message: 'No product details',
28+
publication_viewer_offer_increase_quantity: 'Increase quantity',
29+
publication_viewer_offer_decrease_quantity: 'Decrease quantity'
2830
};

locales/nb_NO.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@ export default {
2525
publication_viewer_offer_price_from: 'Fra',
2626
publication_viewer_offer_price_for: 'for',
2727
publication_viewer_offer_valid_from: 'Gjelder kun fra ',
28-
publication_viewer_no_product_message: 'Ingen produktdetalje'
28+
publication_viewer_no_product_message: 'Ingen produktdetalje',
29+
publication_viewer_offer_increase_quantity: 'Øk antall',
30+
publication_viewer_offer_decrease_quantity: 'Minsk antall'
2931
};

locales/sv_SE.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ export default {
2424
publication_viewer_offer_price_from: 'Från',
2525
publication_viewer_offer_price_for: 'för',
2626
publication_viewer_offer_valid_from: 'Gäller endast fr.o.m ',
27-
publication_viewer_no_product_message: 'Inga produktdetaljer'
27+
publication_viewer_no_product_message: 'Inga produktdetaljer',
28+
publication_viewer_offer_increase_quantity: 'Öka antal',
29+
publication_viewer_offer_decrease_quantity: 'Minska antal'
2830
};

0 commit comments

Comments
 (0)