Skip to content

Commit

Permalink
Make the rating validation message translatable
Browse files Browse the repository at this point in the history
Add rating validation message to the i18n file
  • Loading branch information
Echron committed Sep 26, 2017
1 parent 0c0393d commit a986aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/code/Magento/Review/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ Summary,Summary
"Allow Guests to Write Reviews","Allow Guests to Write Reviews"
Active,Active
Inactive,Inactive
"Please select one of each of the ratings above.","Please select one of each of the ratings above."
2 changes: 1 addition & 1 deletion app/code/Magento/Review/view/frontend/templates/form.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
id="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>"
value="<?= $block->escapeHtmlAttr($_option->getId()) ?>"
class="radio"
data-validate="{required:true, messages:{required:'Please select one of each of the ratings above.'}}"
data-validate="{required:true, messages:{required:'<?php echo __('Please select one of each of the ratings above.'); ?>'}}"
aria-labelledby="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_rating_label <?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>_label" />
<label
class="rating-<?= $block->escapeHtmlAttr($iterator) ?>"
Expand Down

0 comments on commit a986aa9

Please sign in to comment.