Permalink
Browse files

Added space as default separator when `wordSeparator` setting isn't d…

…efined

Fixes #61
  • Loading branch information...
1 parent 22d6710 commit 0236ebd2a492b550893e6f7b479a37735a857812 @rmm5t committed Mar 12, 2012
Showing with 4 additions and 5 deletions.
  1. +2 −1 jquery.timeago.js
  2. +2 −4 test/test_helpers.js
View
@@ -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);
@@ -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 лет"); }
};
})();
}

0 comments on commit 0236ebd

Please sign in to comment.