diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 12e14b874..9c13272c0 100755 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -471,7 +471,7 @@ func Str2html(raw string) template.HTML { func subOne(length int) int { return length - 1 } -func addOne(length int) int { +func addOne(length int64) int { return length + 1 } // Escape escapes a HTML string diff --git a/templates/custom/task_wait_count.tmpl b/templates/custom/task_wait_count.tmpl index 53405b0dd..997a0f1c3 100644 --- a/templates/custom/task_wait_count.tmpl +++ b/templates/custom/task_wait_count.tmpl @@ -1,7 +1,7 @@
- {{.i18n.Tr "repo.wait_count_start"}} {{if .WaitCount}}1{{else}}{{addOne .WaitCount}}{{end}} {{.i18n.Tr "repo.wait_count_end"}} + {{.i18n.Tr "repo.wait_count_start"}} {{if not .WaitCount}}1{{else}}{{addOne .WaitCount}}{{end}} {{.i18n.Tr "repo.wait_count_end"}}