Permalink
Browse files

fixed a bunch of plurals in the config.js

  • Loading branch information...
1 parent 040442f commit ee5d6702966d326802e935848567f960e33d5d7b @lmatteis committed Feb 11, 2013
Showing with 31 additions and 31 deletions.
  1. +13 −13 app.js
  2. +18 −18 common/util.js
View
26 app.js
@@ -260,13 +260,13 @@ ddoc.lists.all = function(head, req) {
var doc = row.value.doc;
doc.domain = row.value.domain;
- if(row.value.points > 1) {
- doc.points = row.value.points + ' ' + points;
- } else {
+ if(row.value.points == 1) {
doc.points = row.value.points + ' ' + point;
+ } else {
+ doc.points = row.value.points + ' ' + points;
}
- doc.numcomments = (row.value.numcomments > 1 ? row.value.numcomments + ' ' + conf_comments : row.value.numcomments + ' ' + conf_comment);
+ doc.numcomments = (row.value.numcomments == 1 ? row.value.numcomments + ' ' + conf_comment : row.value.numcomments + ' ' + conf_comments);
doc.counter = (++counter) + querySkip;
doc.pretty_date = util.timeDifference(new Date(), new Date(doc.created_at), this.templates.partials);
@@ -300,14 +300,14 @@ ddoc.lists.item = function(head, req) {
var point = this.templates.partials.conf_point;
var points = this.templates.partials.conf_points;
- if(value.points > 1) {
- doc.points = value.points + ' ' + points;
- } else {
+ if(value.points == 1) {
doc.points = value.points + ' ' + point;
+ } else {
+ doc.points = value.points + ' ' + points;
}
- doc.numcomments = (value.numcomments > 1 ?
- value.numcomments + ' ' + this.templates.partials.conf_comments :
- value.numcomments + ' ' + this.templates.partials.conf_comment);
+ doc.numcomments = (value.numcomments == 1 ?
+ value.numcomments + ' ' + this.templates.partials.conf_comment :
+ value.numcomments + ' ' + this.templates.partials.conf_comments);
doc.pretty_date = util.timeDifference(currDate, new Date(doc.created_at), this.templates.partials);
@@ -331,10 +331,10 @@ ddoc.lists.item = function(head, req) {
}
comment.pretty_date = util.timeDifference(currDate, new Date(comment.comment_id), this.templates.partials);
- if(comment.points > 1) {
- comment.points += ' ' + points;
- } else {
+ if(comment.points == 1) {
comment.points += ' ' + point;
+ } else {
+ comment.points += ' ' + points;
}
}
View
@@ -56,60 +56,60 @@ exports.timeDifference = function(current, previous, config) {
if (elapsed < msPerMinute) {
var val = Math.round(elapsed/1000);
- if(val > 1) {
- val += ' ' + config.conf_secondsago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_secondago;
+ } else {
+ val += ' ' + config.conf_secondsago;
}
return val;
}
else if (elapsed < msPerHour) {
var val = Math.round(elapsed/msPerMinute);
- if(val > 1) {
- val += ' ' + config.conf_minutesago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_minuteago;
+ } else {
+ val += ' ' + config.conf_minutesago;
}
return val;
}
else if (elapsed < msPerDay ) {
var val = Math.round(elapsed/msPerHour );
- if(val > 1) {
- val += ' ' + config.conf_hoursago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_hourago;
+ } else {
+ val += ' ' + config.conf_hoursago;
}
return val;
}
else if (elapsed < msPerMonth) {
var val = Math.round(elapsed/msPerDay);
- if(val > 1) {
- val += ' ' + config.conf_daysago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_dayago;
+ } else {
+ val += ' ' + config.conf_daysago;
}
return val;
}
else if (elapsed < msPerYear) {
var val = Math.round(elapsed/msPerMonth);
- if(val > 1) {
- val += ' ' + config.conf_monthsago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_monthago;
+ } else {
+ val += ' ' + config.conf_monthsago;
}
return val;
}
else {
var val = Math.round(elapsed/msPerYear );
- if(val > 1) {
- val += ' ' + config.conf_yearsago;
- } else {
+ if(val == 1) {
val += ' ' + config.conf_yearago;
+ } else {
+ val += ' ' + config.conf_yearsago;
}
return val;
}

0 comments on commit ee5d670

Please sign in to comment.