-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor copy changes #3074
Minor copy changes #3074
Conversation
Fixes #3058
Codecov Report
@@ Coverage Diff @@
## master #3074 +/- ##
==========================================
+ Coverage 33.46% 33.48% +0.02%
==========================================
Files 270 270
Lines 39595 39595
==========================================
+ Hits 13249 13258 +9
+ Misses 24460 24446 -14
- Partials 1886 1891 +5
Continue to review full report at Codecov.
|
LGTM |
templates/repo/sub_menu.tmpl
Outdated
@@ -2,12 +2,12 @@ | |||
<div class="ui two horizontal center link list"> | |||
{{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}} | |||
<div class="item{{if .PageIsCommits}} active{{end}}"> | |||
<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> | |||
<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> {{if eq .CommitsCount 1}}{{.i18n.Tr "repo.commit"}}{{else}}{{.i18n.Tr "repo.commits"}}{{end}}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use TrN
for translations that depend on count.
{{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commit") }}
templates/repo/sub_menu.tmpl
Outdated
</div> | ||
{{end}} | ||
{{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo) }} | ||
<div class="item{{if .PageIsBranches}} active{{end}}"> | ||
<a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BrancheCount}}</b> {{.i18n.Tr "repo.branches"}}</a> | ||
<a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BrancheCount}}</b> {{if eq .BrancheCount 1}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.branches"}}{{end}}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
Fix minor type with branches count
@@ -2,12 +2,12 @@ | |||
<div class="ui two horizontal center link list"> | |||
{{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}} | |||
<div class="item{{if .PageIsCommits}} active{{end}}"> | |||
<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> | |||
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguably, the {{.CommitsCount}
should be embedded in the locale, instead of hard-coded in front of it, to support languages where cardinal numbers appear after nouns (e.g. https://en.wikipedia.org/wiki/Oromo_language#Number).
But that's probably best left for another day...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a new locale string, I'd argue we do that now instead of break all languages in the future.
LGTM |
Fixes #3058