diff --git a/src/components/views/rooms/PresenceLabel.js b/src/components/views/rooms/PresenceLabel.js index d06b46641c..b79de2b21c 100644 --- a/src/components/views/rooms/PresenceLabel.js +++ b/src/components/views/rooms/PresenceLabel.js @@ -55,17 +55,17 @@ module.exports = React.createClass({ var d = parseInt(t / (60 * 60 * 24)); if (t < 60) { if (t < 0) { - return "0s"; + return _t("for %(amount)ss", {amount: 0}); } - return s + "s"; + return _t("for %(amount)ss", {amount: s}); } if (t < 60 * 60) { - return m + "m"; + return _t("for %(amount)sm", {amount: m}); } if (t < 24 * 60 * 60) { - return h + "h"; + return _t("for %(amount)sh", {amount: h}); } - return d + "d "; + return _t("for %(amount)sd", {amount: d}); }, getPrettyPresence: function(presence) { @@ -77,9 +77,8 @@ module.exports = React.createClass({ render: function() { if (this.props.activeAgo >= 0) { - var ago = this.props.currentlyActive ? "" : "for " + (this.getDuration(this.props.activeAgo)); - // var ago = this.getDuration(this.props.activeAgo) + " ago"; - // if (this.props.currentlyActive) ago += " (now?)"; + let duration = this.getDuration(this.props.activeAgo); + let ago = this.props.currentlyActive || !duration ? "" : duration; return (