Skip to content

Commit 813e757

Browse files
committed
release
1 parent cf28856 commit 813e757

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

options/locale/locale_en-US.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ issue.action.new = Created #%[2]d.
355355
issue.in_tree_path = In %s:
356356
357357
release.new.subject = %s in %s released
358+
release.new.body = <b>@%[1]s</b> released <a href="%[2]s">%[3]s</a> in <a href="%[4]s">%[5]s</a>
359+
release.title = Title: %s
360+
release.note = Note:
361+
release.downloads = Downloads:
362+
release.download.zip = <a href="%s" rel="nofollow"><strong> Source Code (ZIP)</strong></a>
363+
release.download.targz = <a href="%s"><strong> Source Code (TAR.GZ)</strong></a>
358364
359365
repo.transfer.subject_to = %s would like to transfer "%s" to %s
360366
repo.transfer.subject_to_you = %s would like to transfer "%s" to you

templates/mail/release.tmpl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313

1414
<body>
1515
<p>
16-
<b>@{{.Release.Publisher.Name}}</b> released <a href="{{.Release.HTMLURL}}">{{.Release.TagName}}</a>
17-
in <a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}">{{.Release.Repo.FullName}}</a>
16+
{{.i18n.Tr "mail.release.new.body" .Release.Publisher.Name .Release.HTMLURL .Release.TagName .Release.Repo.HTMLURL .Release.Repo.FullName | Str2html}}
1817
</p>
19-
<h4>Title: {{.Release.Title}}</h4>
18+
<h4>{{.i18n.Tr "mail.release.title" .Release.Title}}</h4>
2019
<p>
21-
Note: <br>
20+
{{.i18n.Tr "mail.release.note"}}<br>
2221
{{- if eq .Release.RenderedNote ""}}
2322
{{else}}
2423
{{.Release.RenderedNote | Str2html}}
@@ -28,13 +27,16 @@
2827
<p>
2928
---
3029
<br>
31-
Downloads:
30+
{{.i18n.Tr "mail.release.downloads"}}
3231
<ul>
32+
{{$tagname := .Release.TagName | EscapePound}}
3333
<li>
34-
<a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}/archive/{{.Release.TagName | EscapePound}}.zip" rel="nofollow"><strong> Source Code (ZIP)</strong></a>
34+
{{$zip_url := printf "%s%s/%s/archive/%s.zip" AppUrl .Release.Repo.OwnerName .Release.Repo.Name $tagname}}
35+
{{.i18n.Tr "mail.release.download.zip" $zip_url | Str2html}}
3536
</li>
3637
<li>
37-
<a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}/archive/{{.Release.TagName | EscapePound}}.tar.gz"><strong> Source Code (TAR.GZ)</strong></a>
38+
{{$targz_url := printf "%s%s/%s/archive/%s.tar.gz" AppUrl .Release.Repo.OwnerName .Release.Repo.Name $tagname}}
39+
{{.i18n.Tr "mail.release.download.targz" $targz_url | Str2html}}
3840
</li>
3941
{{if .Release.Attachments}}
4042
{{range .Release.Attachments}}

0 commit comments

Comments
 (0)