Skip to content

Commit 7bf773b

Browse files
committed
fix incorrect translation, remove SafeHTML
1 parent b9e5676 commit 7bf773b

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ issues.del_time = Delete this time log
16901690
issues.add_time_short = Add Time
16911691
issues.add_time_cancel = Cancel
16921692
issues.add_time_history = `added spent time <b>%s</b> %s`
1693-
issues.del_time_history= `deleted spent time <b>%s</b> %s`
1693+
issues.del_time_history= `deleted spent time %s`
16941694
issues.add_time_hours = Hours
16951695
issues.add_time_minutes = Minutes
16961696
issues.add_time_sum_to_small = No time was entered.

templates/repo/issue/view_content/comments.tmpl

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,9 @@
251251
{{template "shared/user/avatarlink" dict "user" .Poster}}
252252
<span class="text grey muted-links">
253253
{{template "shared/user/authorlink" .Poster}}
254-
255-
{{$timeStr := ""}}
256-
{{if .RenderedContent}}
257-
{{/* compatibility with time comments made before v1.21 */}}
258-
{{$timeStr = .RenderedContent}}
259-
{{else}}
260-
{{$timeStr = .Content|Sec2Time}}
261-
{{end}}
262-
263-
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $timeStr $createdStr | SafeHTML}}
254+
{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
255+
{{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}}
256+
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $timeStr $createdStr}}
264257
</span>
265258
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
266259
</div>
@@ -270,16 +263,9 @@
270263
{{template "shared/user/avatarlink" dict "user" .Poster}}
271264
<span class="text grey muted-links">
272265
{{template "shared/user/authorlink" .Poster}}
273-
274-
{{$timeStr := ""}}
275-
{{if .RenderedContent}}
276-
{{/* compatibility with time comments made before v1.21 */}}
277-
{{$timeStr = .RenderedContent}}
278-
{{else}}
279-
{{$timeStr = .Content|Sec2Time}}
280-
{{end}}
281-
282-
{{ctx.Locale.Tr "repo.issues.add_time_history" $timeStr $createdStr | SafeHTML}}
266+
{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
267+
{{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}}
268+
{{ctx.Locale.Tr "repo.issues.add_time_history" $timeStr $createdStr}}
283269
</span>
284270
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
285271
</div>

0 commit comments

Comments
 (0)