Skip to content

Commit 279d1a8

Browse files
author
Earl Warren
committed
Merge pull request '[v7.0/forgejo] Plural support for release download count' (go-gitea#3037) from bp-v7.0/forgejo-2fff6c2 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3037 Reviewed-by: 0ko <[email protected]>
2 parents 2c263b2 + bf275ac commit 279d1a8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,8 @@ release.tag_name_invalid = The tag name is not valid.
26352635
release.tag_name_protected = The tag name is protected.
26362636
release.tag_already_exist = This tag name already exists.
26372637
release.downloads = Downloads
2638-
release.download_count = %s downloads
2638+
release.download_count_one = %s download
2639+
release.download_count_few = %s downloads
26392640
release.add_tag_msg = Use the title and content of release as tag message.
26402641
release.add_tag = Create Tag Only
26412642
release.releases_for = Releases for %s

templates/repo/release/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<strong>{{svg "octicon-package" 16 "tw-mr-1"}}{{.Name}}</strong>
9090
</a>
9191
<div>
92-
<span class="text grey">{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}}</span>
92+
<span class="text grey">{{ctx.Locale.TrN .DownloadCount "repo.release.download_count_one" "repo.release.download_count_few" (ctx.Locale.PrettyNumber .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}}</span>
9393
</div>
9494
</li>
9595
{{end}}

templates/repo/release/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<div class="flex-text-inline tw-flex-1">
6565
<input name="attachment-edit-{{.UUID}}" class="attachment_edit" required value="{{.Name}}">
6666
<input name="attachment-del-{{.UUID}}" type="hidden" value="false">
67-
<span class="ui text grey tw-whitespace-nowrap">{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}}</span>
67+
<span class="ui text grey tw-whitespace-nowrap">{{ctx.Locale.TrN .DownloadCount "repo.release.download_count_one" "repo.release.download_count_few" (ctx.Locale.PrettyNumber .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}}</span>
6868
</div>
6969
<a class="ui mini compact red button remove-rel-attach" data-id="{{.ID}}" data-uuid="{{.UUID}}">
7070
{{ctx.Locale.Tr "remove"}}

0 commit comments

Comments
 (0)