diff --git a/jquery.timeago.js b/jquery.timeago.js index 3a8f004..504f7dc 100644 --- a/jquery.timeago.js +++ b/jquery.timeago.js @@ -84,7 +84,8 @@ years < 1.5 && substitute($l.year, 1) || substitute($l.years, Math.round(years)); - return $.trim([prefix, words, suffix].join($l.wordSeparator)); + var separator = $l.wordSeparator === undefined ? " " : $l.wordSeparator; + return $.trim([prefix, words, suffix].join(separator)); }, parse: function(iso8601) { var s = $.trim(iso8601); diff --git a/test/test_helpers.js b/test/test_helpers.js index b8cf36a..78f956e 100644 --- a/test/test_helpers.js +++ b/test/test_helpers.js @@ -36,8 +36,7 @@ function loadPigLatin() { month: "about-hay a-hay onth-may", months: "%d onths-may", year: "about-hay a-hay ear-yay", - years: "%d years-yay", - wordSeparator: " " + years: "%d years-yay" }; } @@ -72,8 +71,7 @@ function loadRussian() { month: "месяц", months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); }, year: "год", - years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); }, - wordSeparator: " " + years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); } }; })(); }