This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,17 @@ module.exports = React.createClass({
55
55
var d = parseInt ( t / ( 60 * 60 * 24 ) ) ;
56
56
if ( t < 60 ) {
57
57
if ( t < 0 ) {
58
- return "0s" ;
58
+ return _t ( "for %(amount)ss" , { amount : 0 } ) ;
59
59
}
60
- return s + "s" ;
60
+ return _t ( "for %(amount)ss" , { amount : s } ) ;
61
61
}
62
62
if ( t < 60 * 60 ) {
63
- return m + "m" ;
63
+ return _t ( "for %(amount)sm" , { amount : m } ) ;
64
64
}
65
65
if ( t < 24 * 60 * 60 ) {
66
- return h + "h" ;
66
+ return _t ( "for %(amount)sh" , { amount : h } ) ;
67
67
}
68
- return d + "d " ;
68
+ return _t ( "for %(amount)sd" , { amount : d } ) ;
69
69
} ,
70
70
71
71
getPrettyPresence : function ( presence ) {
@@ -77,9 +77,8 @@ module.exports = React.createClass({
77
77
78
78
render : function ( ) {
79
79
if ( this . props . activeAgo >= 0 ) {
80
- var ago = this . props . currentlyActive ? "" : "for " + ( this . getDuration ( this . props . activeAgo ) ) ;
81
- // var ago = this.getDuration(this.props.activeAgo) + " ago";
82
- // if (this.props.currentlyActive) ago += " (now?)";
80
+ let duration = this . getDuration ( this . props . activeAgo ) ;
81
+ let ago = this . props . currentlyActive || ! duration ? "" : duration ;
83
82
return (
84
83
< div className = "mx_PresenceLabel" >
85
84
{ this . getPrettyPresence ( this . props . presenceState ) } { ago }
Original file line number Diff line number Diff line change 765
765
"Drop file here to upload" : " Drop file here to upload" ,
766
766
" (unsupported)" : " (unsupported)" ,
767
767
"Ongoing conference call%(supportedText)s. %(joinText)s" : " Ongoing conference call%(supportedText)s. %(joinText)s" ,
768
+ "for %(amount)ss" : " for %(amount)ss" ,
769
+ "for %(amount)sm" : " for %(amount)sm" ,
770
+ "for %(amount)sh" : " for %(amount)sh" ,
771
+ "for %(amount)sd" : " for %(amount)sd" ,
768
772
"Online" : " Online" ,
769
773
"Idle" : " Idle" ,
770
774
"Offline" : " Offline" ,
You can’t perform that action at this time.
0 commit comments