From 17b15af66ba208cc12cd7d6e03b6128d3722e690 Mon Sep 17 00:00:00 2001 From: sIiiS Date: Sat, 25 Jun 2016 17:43:45 +0430 Subject: [PATCH] Translation in validation/validation.js added $.mage.__ --- lib/web/mage/validation/validation.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/web/mage/validation/validation.js b/lib/web/mage/validation/validation.js index a60ca5e737b6d..fb60ca00206a0 100644 --- a/lib/web/mage/validation/validation.js +++ b/lib/web/mage/validation/validation.js @@ -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) { @@ -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) { @@ -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) { @@ -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) { @@ -139,4 +139,4 @@ rule.unshift(i); $.validator.addMethod.apply($.validator, rule); }); -})); \ No newline at end of file +}));