From: Mattia Larentis Date: Tue, 14 May 2013 17:06:05 +0000 (+0200) Subject: fix test and some translations X-Git-Tag: 2.1.0~38^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F781%2Fhead;p=thirdparty%2Fmoment.git fix test and some translations --- diff --git a/lang/it.js b/lang/it.js index 18ab379be..c9df924b2 100644 --- a/lang/it.js +++ b/lang/it.js @@ -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", diff --git a/test/lang/it.js b/test/lang/it.js index 3a17a00fa..e6857c2b0 100644 --- a/test/lang/it.js +++ b/test/lang/it.js @@ -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(); },