Merge pull request 'Improve localization of repo summary' (#2756) from 0ko/forgejo:i18n-repository-summary into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2756
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-03-27 13:35:54 +00:00
commit 50de5046d7
3 changed files with 12 additions and 4 deletions

View file

@ -1242,6 +1242,14 @@ commit = Commit
release = Release release = Release
releases = Releases releases = Releases
tag = Tag tag = Tag
n_commit_one=%s commit
n_commit_few=%s commits
n_branch_one=%s branch
n_branch_few=%s branches
n_tag_one=%s tag
n_tag_few=%s tags
released_this = released this released_this = released this
file.title = %s at %s file.title = %s at %s
file_raw = Raw file_raw = Raw

View file

@ -1,7 +1,7 @@
<h4 class="ui top attached header commits-table tw-flex tw-items-center tw-justify-between"> <h4 class="ui top attached header commits-table tw-flex tw-items-center tw-justify-between">
<div class="commits-table-left tw-flex tw-items-center"> <div class="commits-table-left tw-flex tw-items-center">
{{if or .PageIsCommits (gt .CommitCount 0)}} {{if or .PageIsCommits (gt .CommitCount 0)}}
{{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}} {{ctx.Locale.TrN .CommitCount "repo.n_commit_one" "repo.n_commit_few" (StringUtils.ToString .CommitCount)}}
{{else if .IsNothingToCompare}} {{else if .IsNothingToCompare}}
{{ctx.Locale.Tr "repo.commits.nothing_to_compare"}} {{ctx.Locale.Tr "repo.commits.nothing_to_compare"}}
{{else}} {{else}}

View file

@ -3,14 +3,14 @@
<div class="ui segment sub-menu repository-menu"> <div class="ui segment sub-menu repository-menu">
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}} {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
<a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}"> <a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">
{{svg "octicon-history"}} <b>{{ctx.Locale.PrettyNumber .CommitsCount}}</b> {{ctx.Locale.TrN .CommitsCount "repo.commit" "repo.commits"}} {{svg "octicon-history"}} {{ctx.Locale.TrN .CommitsCount "repo.n_commit_one" "repo.n_commit_few" (printf "<b>%d</b>" .CommitsCount | SafeHTML)}}
</a> </a>
<a class="item muted {{if .PageIsBranches}}active{{end}}" href="{{.RepoLink}}/branches"> <a class="item muted {{if .PageIsBranches}}active{{end}}" href="{{.RepoLink}}/branches">
{{svg "octicon-git-branch"}} <b>{{ctx.Locale.PrettyNumber .BranchesCount}}</b> {{ctx.Locale.TrN .BranchesCount "repo.branch" "repo.branches"}} {{svg "octicon-git-branch"}} {{ctx.Locale.TrN .BranchesCount "repo.n_branch_one" "repo.n_branch_few" (printf "<b>%d</b>" .BranchesCount | SafeHTML)}}
</a> </a>
{{if $.Permission.CanRead $.UnitTypeCode}} {{if $.Permission.CanRead $.UnitTypeCode}}
<a class="item muted {{if .PageIsTagList}}active{{end}}" href="{{.RepoLink}}/tags"> <a class="item muted {{if .PageIsTagList}}active{{end}}" href="{{.RepoLink}}/tags">
{{svg "octicon-tag"}} <b>{{ctx.Locale.PrettyNumber .NumTags}}</b> {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}} {{svg "octicon-tag"}} {{ctx.Locale.TrN .NumTags "repo.n_tag_one" "repo.n_tag_few" (printf "<b>%d</b>" .NumTags | SafeHTML)}}
</a> </a>
{{end}} {{end}}
<span class="item not-mobile" {{if not (eq .Repository.Size 0)}}data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}> <span class="item not-mobile" {{if not (eq .Repository.Size 0)}}data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>