Skip to content

Translation in validation/validation.js #5253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/web/mage/validation/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
});
return result && total > 0;
},
'Please specify the quantity of product(s).'
$.mage.__('Please specify the quantity of product(s).')
],
'validate-one-checkbox-required-by-name': [
function (value, element, params) {
Expand All @@ -60,7 +60,7 @@
return false;
}
},
'Please select one of the options.'
$.mage.__('Please select one of the options.')
],
'validate-date-between': [
function (value, element, params) {
Expand Down Expand Up @@ -89,7 +89,7 @@
yearVal = $(dob).find(params[2]).find('input:text').val(),
dobLength = dayVal.length + monthVal.length + yearVal.length;
if (params[3] && dobLength === 0) {
this.dobErrorMessage = 'This is a required field.';
this.dobErrorMessage = $.mage.__('This is a required field.');
return false;
}
if (!params[3] && dobLength === 0) {
Expand All @@ -100,11 +100,11 @@
year = parseInt(yearVal, 10) || 0,
curYear = (new Date()).getFullYear();
if (!day || !month || !year) {
this.dobErrorMessage = 'Please enter a valid full date.';
this.dobErrorMessage = $.mage.__('Please enter a valid full date.');
return false;
}
if (month < 1 || month > 12) {
this.dobErrorMessage = 'Please enter a valid month (1-12).';
this.dobErrorMessage = $.mage.__('Please enter a valid month (1-12).');
return false;
}
if (year < 1900 || year > curYear) {
Expand Down Expand Up @@ -139,4 +139,4 @@
rule.unshift(i);
$.validator.addMethod.apply($.validator, rule);
});
}));
}));