@@ -51,133 +51,134 @@ const ActivityItem = React.createClass({
5151 let orgId = this . props . orgId ;
5252 let project = item . project ;
5353 let issue = item . issue ;
54+ let issueLink = issue
55+ ? < Link to = { `/${ orgId } /${ project . slug } /issues/${ issue . id } /` } > { issue . shortId } </ Link >
56+ : null ;
5457
5558 switch ( item . type ) {
5659 case 'note' :
57- return tct ( '[author] commented on [link:an issue]' , {
60+ return tct ( '[author] commented on [issue]' , {
5861 author : author ,
59- link : (
62+ issue : (
6063 < Link
61- to = { `/${ orgId } /${ project . slug } /issues/${ issue . id } /activity/#event_${ item . id } ` }
62- />
64+ to = { `/${ orgId } /${ project . slug } /issues/${ issue . id } /activity/#event_${ item . id } ` } >
65+ { issue . shortId }
66+ </ Link >
6367 )
6468 } ) ;
6569 case 'set_resolved' :
66- return tct ( '[author] marked [link:an issue] as resolved' , {
70+ return tct ( '[author] marked [issue] as resolved' , {
6771 author : author ,
68- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
72+ issue : issueLink
6973 } ) ;
7074 case 'set_resolved_by_age' :
71- return tct ( '[author] marked [link:an issue] as resolved due to age' , {
75+ return tct ( '[author] marked [issue] as resolved due to age' , {
7276 author : author ,
73- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
77+ issue : issueLink
7478 } ) ;
7579 case 'set_resolved_in_release' :
7680 if ( data . version ) {
77- return tct ( '[author] marked [link:an issue] as resolved in [version]' , {
81+ return tct ( '[author] marked [issue] as resolved in [version]' , {
7882 author : author ,
7983 version : (
8084 < Version version = { data . version } orgId = { orgId } projectId = { project . slug } />
8185 ) ,
82- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
86+ issue : issueLink
8387 } ) ;
8488 }
85- return tct (
86- '[author] marked [link:an issue] as resolved in the upcoming release' ,
87- {
88- author : author ,
89- link : < Link to = { `/${ orgId } /${ project . slug } /issues/${ issue . id } /` } />
90- }
91- ) ;
89+ return tct ( '[author] marked [issue] as resolved in the upcoming release' , {
90+ author : author ,
91+ issue : issueLink
92+ } ) ;
9293 case 'set_resolved_in_commit' :
93- return tct ( '[author] marked [link:an issue] as fixed in [version]' , {
94+ return tct ( '[author] marked [issue] as fixed in [version]' , {
9495 author : author ,
9596 version : data . commit . id . substr ( 0 , 12 ) ,
96- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
97+ issue : issueLink
9798 } ) ;
9899 case 'set_unresolved' :
99- return tct ( '[author] marked [link:an issue] as unresolved' , {
100+ return tct ( '[author] marked [issue] as unresolved' , {
100101 author : author ,
101- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
102+ issue : issueLink
102103 } ) ;
103104 case 'set_ignored' :
104105 if ( data . ignoreDuration ) {
105- return tct ( '[author] ignored [link:an issue] for [duration]' , {
106+ return tct ( '[author] ignored [issue] for [duration]' , {
106107 author : author ,
107108 duration : < Duration seconds = { data . ignoreDuration * 60 } /> ,
108- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
109+ issue : issueLink
109110 } ) ;
110111 }
111- return tct ( '[author] ignored [link:an issue]' , {
112+ return tct ( '[author] ignored [issue]' , {
112113 author : author ,
113- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
114+ issue : issueLink
114115 } ) ;
115116 case 'set_public' :
116- return tct ( '[author] made an [link:an issue] public' , {
117+ return tct ( '[author] made an [issue] public' , {
117118 author : author ,
118- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
119+ issue : issueLink
119120 } ) ;
120121 case 'set_private' :
121- return tct ( '[author] made an [link:an issue] private' , {
122+ return tct ( '[author] made an [issue] private' , {
122123 author : author ,
123- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
124+ issue : issueLink
124125 } ) ;
125126 case 'set_regression' :
126127 if ( data . version ) {
127- return tct ( '[author] marked [link:an issue] as a regression in [version]' , {
128+ return tct ( '[author] marked [issue] as a regression in [version]' , {
128129 author : author ,
129130 version : (
130131 < Version version = { data . version } orgId = { orgId } projectId = { project . slug } />
131132 ) ,
132- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
133+ issue : issueLink
133134 } ) ;
134135 }
135- return tct ( '[author] marked [link:an issue] as a regression' , {
136+ return tct ( '[author] marked [issue] as a regression' , {
136137 author : author ,
137- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
138+ issue : issueLink
138139 } ) ;
139140 case 'create_issue' :
140- return tct ( '[author] linked [link:an issue] on [provider]' , {
141+ return tct ( '[author] linked [issue] on [provider]' , {
141142 author : author ,
142143 provider : data . provider ,
143- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
144+ issue : issueLink
144145 } ) ;
145146 case 'first_seen' :
146- return tct ( '[author] saw [link:a new issue]' , {
147+ return tct ( '[author] saw [link:issue]' , {
147148 author : author ,
148- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
149+ issue : issueLink
149150 } ) ;
150151 case 'assigned' :
151152 let assignee ;
152153 if ( item . user && data . assignee === item . user . id ) {
153- return tct ( '[author] assigned [link:an issue] to themselves' , {
154+ return tct ( '[author] assigned [issue] to themselves' , {
154155 author : author ,
155- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
156+ issue : issueLink
156157 } ) ;
157158 }
158159 assignee = MemberListStore . getById ( data . assignee ) ;
159160 if ( assignee && assignee . email ) {
160- return tct ( '[author] assigned [link:an issue] to [assignee]' , {
161+ return tct ( '[author] assigned [issue] to [assignee]' , {
161162 author : author ,
162163 assignee : < span title = { assignee . email } > { assignee . name } </ span > ,
163- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
164+ issue : issueLink
164165 } ) ;
165166 } else if ( data . assigneeEmail ) {
166- return tct ( '[author] assigned [link:an issue] to [assignee]' , {
167+ return tct ( '[author] assigned [issue] to [assignee]' , {
167168 author : author ,
168169 assignee : data . assigneeEmail ,
169- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
170+ issue : issueLink
170171 } ) ;
171172 }
172- return tct ( '[author] assigned [link:an issue] to an [help:unknown user]' , {
173+ return tct ( '[author] assigned [issue] to an [help:unknown user]' , {
173174 author : author ,
174175 help : < span title = { data . assignee } /> ,
175- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
176+ issue : issueLink
176177 } ) ;
177178 case 'unassigned' :
178- return tct ( '[author] unassigned [link:an issue]' , {
179+ return tct ( '[author] unassigned [issue]' , {
179180 author : author ,
180- link : < Link to = { `/ ${ orgId } / ${ project . slug } /issues/ ${ issue . id } /` } />
181+ issue : issueLink
181182 } ) ;
182183 case 'merge' :
183184 return tct ( '[author] merged [count] [link:issues]' , {
0 commit comments