Skip to content
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

Merged
merged 3 commits into from
Dec 3, 2017
Merged

Minor copy changes #3074

merged 3 commits into from
Dec 3, 2017

Conversation

techknowlogick
Copy link
Member

Fixes #3058

@codecov-io
Copy link

codecov-io commented Dec 3, 2017

Codecov Report

Merging #3074 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
modules/context/repo.go 59.57% <100%> (ø) ⬆️
models/repo.go 38.15% <0%> (-0.19%) ⬇️
modules/indexer/repo.go 63.47% <0%> (+2.6%) ⬆️
models/repo_indexer.go 51.98% <0%> (+2.97%) ⬆️
modules/process/manager.go 81.15% <0%> (+4.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab62da2...b3fc6df. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 3, 2017
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Dec 3, 2017
@lunny lunny added this to the 1.4.0 milestone Dec 3, 2017
@lunny
Copy link
Member

lunny commented Dec 3, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 3, 2017
@@ -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>
Copy link
Member

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") }}

</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>
Copy link
Member

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>
Copy link
Member

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...

Copy link
Member

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.

@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 3, 2017
@lafriks lafriks merged commit 993b866 into go-gitea:master Dec 3, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minor copy changes to commit(s)/branch(es) tab
7 participants