From 866d2835d108299311d3a366a9298bb042761a15 Mon Sep 17 00:00:00 2001 From: tinect Date: Thu, 7 Sep 2023 11:59:40 +0200 Subject: [PATCH] fix: add translated reviewCount (#54) --- src/Resources/snippet/froshProductCompare.de-DE.json | 3 +++ src/Resources/snippet/froshProductCompare.en-GB.json | 3 +++ src/Resources/snippet/froshProductCompare.fr-FR.json | 3 +++ src/Resources/snippet/froshProductCompare.nl-NL.json | 3 +++ .../component/compare/partial/rating-cells.html.twig | 3 +-- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Resources/snippet/froshProductCompare.de-DE.json b/src/Resources/snippet/froshProductCompare.de-DE.json index 6566ef1..fc90cab 100644 --- a/src/Resources/snippet/froshProductCompare.de-DE.json +++ b/src/Resources/snippet/froshProductCompare.de-DE.json @@ -21,6 +21,9 @@ "rating": "Bewertung", "title": "Überblick" }, + "content": { + "reviewLinkText": "{0} 0 Bewertungen | {1} 1 Bewertung|]1,Inf[ %count% Bewertungen" + }, "specification": { "title": "Spezifikation", "notSpecified": "-" diff --git a/src/Resources/snippet/froshProductCompare.en-GB.json b/src/Resources/snippet/froshProductCompare.en-GB.json index 607707b..7730e8e 100644 --- a/src/Resources/snippet/froshProductCompare.en-GB.json +++ b/src/Resources/snippet/froshProductCompare.en-GB.json @@ -21,6 +21,9 @@ "rating": "Rating", "title": "Overview" }, + "content": { + "reviewLinkText": "{0} 0 reviews | {1} 1 review|]1,Inf[ %count% reviews" + }, "specification": { "title": "Specification", "notSpecified": "-" diff --git a/src/Resources/snippet/froshProductCompare.fr-FR.json b/src/Resources/snippet/froshProductCompare.fr-FR.json index 6124996..eba1b5d 100644 --- a/src/Resources/snippet/froshProductCompare.fr-FR.json +++ b/src/Resources/snippet/froshProductCompare.fr-FR.json @@ -21,6 +21,9 @@ "rating": "Évaluation", "title": "Aperçu" }, + "content": { + "reviewLinkText": "{0} 0 évaluations | {1} 1 évaluation|]1,Inf[ %count% évaluations" + }, "specification": { "title": "Spécifications", "notSpecified": "-" diff --git a/src/Resources/snippet/froshProductCompare.nl-NL.json b/src/Resources/snippet/froshProductCompare.nl-NL.json index deeff26..a6e5dfd 100644 --- a/src/Resources/snippet/froshProductCompare.nl-NL.json +++ b/src/Resources/snippet/froshProductCompare.nl-NL.json @@ -21,6 +21,9 @@ "rating": "Beoordeling", "title": "Overzicht" }, + "content": { + "reviewLinkText": "{0} 0 beoordelingen | {1} 1 beoordeling|]1,Inf[ %count% beoordelingen" + }, "specification": { "title": "Specificatie", "notSpecified": "-" diff --git a/src/Resources/views/storefront/component/compare/partial/rating-cells.html.twig b/src/Resources/views/storefront/component/compare/partial/rating-cells.html.twig index 4dabb59..75ba042 100644 --- a/src/Resources/views/storefront/component/compare/partial/rating-cells.html.twig +++ b/src/Resources/views/storefront/component/compare/partial/rating-cells.html.twig @@ -10,8 +10,7 @@ target="_blank" href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}#review-tab-pane" aria-controls="review-tab-pane"> - {{ product.productReviews.count }} - {{ "detail.reviewLinkText"|trans({'%count%': 1})|sw_sanitize }} + {{ "froshProductCompare.section.content.reviewLinkText"|trans({'%count%': product.productReviews.count})|sw_sanitize }} {% endblock %}