]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[locale] es: Add es translation for invalidDate (#4560)
authorKunal Marwaha <marwahaha@berkeley.edu>
Thu, 24 Jan 2019 07:39:48 +0000 (23:39 -0800)
committerGitHub <noreply@github.com>
Thu, 24 Jan 2019 07:39:48 +0000 (23:39 -0800)
* Add es translation for invalidDate

* Fix lint

src/locale/es.js
src/test/locale/es.js

index 4dc588a07ff5d05e96fbff6c833f4d55a2566514..67362d665cc6258e01c869fe15c7508883733f8e 100644 (file)
@@ -79,5 +79,6 @@ export default moment.defineLocale('es', {
     week : {
         dow : 1, // Monday is the first day of the week.
         doy : 4  // The week that contains Jan 4th is the first week of the year.
-    }
+    },
+    invalidDate: 'Fecha invalida'
 });
index ef3e679b9f502411c1f8ac7cbe9144e5b3930970..02bad1d45ea400750247b237032d69804b632436 100644 (file)
@@ -217,3 +217,6 @@ test('test short months proper', function (assert) {
     assert.equal(moment(str, 'DD-MMM-YYYY').month(), '7', '02-ago-2016 month should be 7');
 });
 
+test('translated invalid date', function (assert) {
+    assert.equal(moment('nonsense', 'DD-MMM-YYYY').format(), 'Fecha invalida', 'Invalid date should translate');
+});