Skip to content

Commit a986aa9

Browse files
committed
Make the rating validation message translatable
Add rating validation message to the i18n file
1 parent 0c0393d commit a986aa9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/Review/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ Summary,Summary
132132
"Allow Guests to Write Reviews","Allow Guests to Write Reviews"
133133
Active,Active
134134
Inactive,Inactive
135+
"Please select one of each of the ratings above.","Please select one of each of the ratings above."

app/code/Magento/Review/view/frontend/templates/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
id="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>"
3636
value="<?= $block->escapeHtmlAttr($_option->getId()) ?>"
3737
class="radio"
38-
data-validate="{required:true, messages:{required:'Please select one of each of the ratings above.'}}"
38+
data-validate="{required:true, messages:{required:'<?php echo __('Please select one of each of the ratings above.'); ?>'}}"
3939
aria-labelledby="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_rating_label <?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>_label" />
4040
<label
4141
class="rating-<?= $block->escapeHtmlAttr($iterator) ?>"

0 commit comments

Comments
 (0)