Added space as default separator when wordSeparator setting isn't defined

Fixes #61
This commit is contained in:
Ryan McGeary 2012-03-12 10:12:45 -04:00
parent 22d6710f4b
commit 0236ebd2a4
2 changed files with 4 additions and 5 deletions

View file

@ -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);

View file

@ -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 лет"); }
};
})();
}