Run substitute on all strings

This commit is contained in:
Ryan McGeary 2009-02-18 11:24:57 -05:00
parent 0cd7e1eab1
commit 5346cba5ae

View file

@ -64,15 +64,15 @@
var years = days / 365;
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
seconds < 90 && $l.minute ||
seconds < 90 && substitute($l.minute, 1) ||
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
minutes < 90 && $l.hour ||
minutes < 90 && substitute($l.hour, 1) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 48 && $l.day ||
hours < 48 && substitute($l.day, 1) ||
days < 30 && substitute($l.days, Math.floor(days)) ||
days < 60 && $l.month ||
days < 60 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.floor(days / 30)) ||
years < 2 && $l.year ||
years < 2 && substitute($l.year, 1) ||
substitute($l.years, Math.floor(years));
return $.trim([prefix, words, suffix].join(" "));