Skip to content

Commit 6f3efdf

Browse files
yardenshoham6543
andauthored
Render number of commits in repo page in a user friendly way (#21786)
Use `JsPrettyNumber` to render the number of commits * Closes #12637 ### Before ![1094](https://user-images.githubusercontent.com/20454870/201484428-eaa80d27-eeed-444e-9dc5-ae046424de2f.png) ### After ![1,094](https://user-images.githubusercontent.com/20454870/201484385-b5bdc290-86fd-493b-a87c-c987012b18ad.png) Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: 6543 <[email protected]>
1 parent bea25d7 commit 6f3efdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/sub_menu.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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>{{JsPrettyNumber .CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a>
88
</div>
99
<div class="item{{if .PageIsBranches}} active{{end}}">
1010
<a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a>

0 commit comments

Comments
 (0)