Skip to content

Commit c929ad2

Browse files
committed
Use RenderNumber
Signed-off-by: Yarden Shoham <[email protected]>
1 parent b9319f9 commit c929ad2

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

templates/code/searchresults.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a class="ui text-label df ac mr-1 my-1 {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{AppSubUrl}}{{if $.ContextUser}}/{{$.ContextUser.Name}}/-/code{{else}}/explore/code{{end}}?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}{{if ne $.queryType ""}}&t={{$.queryType}}{{end}}">
44
<i class="color-icon mr-3" style="background-color: {{$term.Color}}"></i>
55
{{$term.Language}}
6-
<div class="detail">{{$term.Count}}</div>
6+
<div class="detail">{{RenderNumber $term.Count $.locale.Language}}</div>
77
</a>
88
{{end}}
99
</div>

templates/package/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div class="item">{{svg "octicon-repo" 16 "mr-3"}} <a href="{{.PackageDescriptor.Repository.HTMLURL}}">{{.PackageDescriptor.Repository.FullName}}</a></div>
4242
{{end}}
4343
<div class="item">{{svg "octicon-calendar" 16 "mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}</div>
44-
<div class="item">{{svg "octicon-download" 16 "mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div>
44+
<div class="item">{{svg "octicon-download" 16 "mr-3"}} {{RenderNumber .PackageDescriptor.Version.DownloadCount $.locale.Language}}</div>
4545
{{template "package/metadata/composer" .}}
4646
{{template "package/metadata/conan" .}}
4747
{{template "package/metadata/container" .}}

templates/repo/activity.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@
6363
<div class="ui attached segment horizontal segments">
6464
{{if .Permission.CanRead $.UnitTypePullRequests}}
6565
<a href="#merged-pull-requests" class="ui attached segment text center">
66-
<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
66+
<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{RenderNumber .Activity.MergedPRCount $.locale.Language}}</strong><br>
6767
{{.locale.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}}
6868
</a>
6969
<a href="#proposed-pull-requests" class="ui attached segment text center">
70-
<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
70+
<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{RenderNumber .Activity.OpenedPRCount $.locale.Language}}</strong><br>
7171
{{.locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}}
7272
</a>
7373
{{end}}
7474
{{if .Permission.CanRead $.UnitTypeIssues}}
7575
<a href="#closed-issues" class="ui attached segment text center">
76-
<span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
76+
<span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{RenderNumber .Activity.ClosedIssueCount $.locale.Language}}</strong><br>
7777
{{.locale.TrN .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n"}}
7878
</a>
7979
<a href="#new-issues" class="ui attached segment text center">
80-
<span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
80+
<span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{RenderNumber .Activity.OpenedIssueCount $.locale.Language}}</strong><br>
8181
{{.locale.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}}
8282
</a>
8383
{{end}}

templates/repo/commits_table.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h4 class="ui top attached header commits-table df ac sb">
22
<div class="commits-table-left df ac">
33
{{if or .PageIsCommits (gt .CommitCount 0)}}
4-
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
4+
{{RenderNumber .CommitCount .locale.Language}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
55
{{else if .IsNothingToCompare}}
66
{{.locale.Tr "repo.commits.nothing_to_compare"}} {{if .RefName}}({{.RefName}}){{end}}
77
{{else}}

templates/repo/sub_menu.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<div class="ui two horizontal center link list">
55
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
66
<div class="item{{if .PageIsCommits}} active{{end}}">
7-
<a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{.CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a>
7+
<a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{RenderNumber .CommitsCount .locale.Language}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a>
88
</div>
99
<div class="item{{if .PageIsBranches}} active{{end}}">
10-
<a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a>
10+
<a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{RenderNumber .BranchesCount .locale.Language}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a>
1111
</div>
1212
{{if $.Permission.CanRead $.UnitTypeCode}}
1313
<div class="item">
14-
<a class="ui" href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{.NumTags}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
14+
<a class="ui" href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{RenderNumber .NumTags .locale.Language}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
1515
</div>
1616
{{end}}
1717
<div class="item">

0 commit comments

Comments
 (0)