]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
fix test and some translations 781/head
authorMattia Larentis <mattia@larentis.eu>
Tue, 14 May 2013 17:06:05 +0000 (19:06 +0200)
committerMattia Larentis <mattia@larentis.eu>
Tue, 14 May 2013 17:06:05 +0000 (19:06 +0200)
lang/it.js
test/lang/it.js

index 18ab379bee28c576ec9404181238c1a7f6030d78..c9df924b296961d1f2f000ea958fc2b94301c6e5 100644 (file)
@@ -25,7 +25,9 @@ require('../moment').lang('it', {
         sameElse: 'L'
     },
     relativeTime : {
-        future : "tra %s",
+        future : function (s) {
+            return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
+        },
         past : "%s fa",
         s : "secondi",
         m : "un minuto",
index 3a17a00fa8177e0b1604ff4efc5a036c56d79be2..e6857c2b069477f2744f239a55c53625d8ddc08c 100644 (file)
@@ -184,7 +184,7 @@ exports["lang:it"] = {
         test.expect(2);
 
         test.equal(moment().add({s:30}).fromNow(), "in secondi", "in seconds");
-        test.equal(moment().add({d:5}).fromNow(), "in 5 giorni", "in 5 days");
+        test.equal(moment().add({d:5}).fromNow(), "tra 5 giorni", "in 5 days");
         test.done();
     },