Browse Source

Minor copy changes (#3074)

* Minor copy changes
Fixes #3058

* Use TrN for translations that depend on count
Fix minor type with branches count
techknowlogick 2 years ago
parent
commit
993b86628b
3 changed files with 4 additions and 3 deletions
  1. 1 1
      modules/context/repo.go
  2. 1 0
      options/locale/locale_en-US.ini
  3. 2 2
      templates/repo/sub_menu.tmpl

+ 1 - 1
modules/context/repo.go

@@ -407,7 +407,7 @@ func RepoAssignment() macaron.Handler {
407 407
 			return
408 408
 		}
409 409
 		ctx.Data["Branches"] = brs
410
-		ctx.Data["BrancheCount"] = len(brs)
410
+		ctx.Data["BranchesCount"] = len(brs)
411 411
 
412 412
 		// If not branch selected, try default one.
413 413
 		// If default branch doesn't exists, fall back to some other branch.

+ 1 - 0
options/locale/locale_en-US.ini

@@ -539,6 +539,7 @@ pulls = Pull Requests
539 539
 labels = Labels
540 540
 milestones = Milestones
541 541
 commits = Commits
542
+commit = Commit
542 543
 releases = Releases
543 544
 file_raw = Raw
544 545
 file_history = History

+ 2 - 2
templates/repo/sub_menu.tmpl

@@ -2,12 +2,12 @@
2 2
 	<div class="ui two horizontal center link list">
3 3
 		{{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}}
4 4
 			<div class="item{{if .PageIsCommits}} active{{end}}">
5
-				<a href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i> <b>{{.CommitsCount}}</b> {{.i18n.Tr "repo.commits"}}</a>
5
+				<a href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i> <b>{{.CommitsCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commits") }}</a>
6 6
 			</div>
7 7
 		{{end}}
8 8
 		{{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo) }}
9 9
 			<div class="item{{if .PageIsBranches}} active{{end}}">
10
-				<a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BrancheCount}}</b> {{.i18n.Tr "repo.branches"}}</a>
10
+				<a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BranchesCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .BranchesCount "repo.branch" "repo.branches") }}</a>
11 11
 			</div>
12 12
 		{{end}}
13 13
 	</div>