Restore the "repo.pulls.no_results" translation key

The previous (cherry picked) commit changed a translation key, from
`repo.pulls.no_results` to `common.no_results_found`. This would break
existing translations, and will have to be handled differently, if at
all.

This changes the affected code to continue using the old key.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-03-23 17:27:31 +01:00
parent 729849a2fd
commit 3c57a62050
No known key found for this signature in database
6 changed files with 8 additions and 9 deletions

View file

@ -156,8 +156,6 @@ filter.not_template = Not Template
filter.public = Public filter.public = Public
filter.private = Private filter.private = Private
no_results_found = No results found.
[aria] [aria]
navbar = Navigation Bar navbar = Navigation Bar
footer = Footer footer = Footer
@ -1776,6 +1774,7 @@ pulls.compare_compare = pull from
pulls.switch_comparison_type = Switch comparison type pulls.switch_comparison_type = Switch comparison type
pulls.switch_head_and_base = Switch head and base pulls.switch_head_and_base = Switch head and base
pulls.filter_branch = Filter branch pulls.filter_branch = Filter branch
pulls.no_results = No results found.
pulls.show_all_commits = Show all commits pulls.show_all_commits = Show all commits
pulls.show_changes_since_your_last_review = Show changes since your last review pulls.show_changes_since_your_last_review = Show changes since your last review
pulls.showing_only_single_commit = Showing only changes of commit %[1]s pulls.showing_only_single_commit = Showing only changes of commit %[1]s

View file

@ -56,7 +56,7 @@
'repoLink': {{.root.RepoLink}}, 'repoLink': {{.root.RepoLink}},
'treePath': {{.root.TreePath}}, 'treePath': {{.root.TreePath}},
'branchNameSubURL': {{.root.BranchNameSubURL}}, 'branchNameSubURL': {{.root.BranchNameSubURL}},
'noResults': {{ctx.Locale.Tr "no_results_found"}}, 'noResults': {{ctx.Locale.Tr "repo.pulls.no_results"}},
}; };
{{if .release}} {{if .release}}
data.release = { data.release = {

View file

@ -29,7 +29,7 @@
{{- end -}} {{- end -}}
<div class="ui segment choose branch"> <div class="ui segment choose branch">
<a class="gt-mr-3" href="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments $.HeadBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{end}}{{PathEscapeSegments $.BaseBranch}}" title="{{ctx.Locale.Tr "repo.pulls.switch_head_and_base"}}">{{svg "octicon-git-compare"}}</a> <a class="gt-mr-3" href="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments $.HeadBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{end}}{{PathEscapeSegments $.BaseBranch}}" title="{{ctx.Locale.Tr "repo.pulls.switch_head_and_base"}}">{{svg "octicon-git-compare"}}</a>
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button"> <div class="ui basic small button">
<span class="text">{{if $.PageIsComparePull}}{{ctx.Locale.Tr "repo.pulls.compare_base"}}{{else}}{{ctx.Locale.Tr "repo.compare.compare_base"}}{{end}}: {{$BaseCompareName}}:{{$.BaseBranch}}</span> <span class="text">{{if $.PageIsComparePull}}{{ctx.Locale.Tr "repo.pulls.compare_base"}}{{else}}{{ctx.Locale.Tr "repo.compare.compare_base"}}{{end}}: {{$BaseCompareName}}:{{$.BaseBranch}}</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}

View file

@ -5,7 +5,7 @@
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
</form> </form>
{{/* TODO: share this branch selector dropdown with the same in repo page */}} {{/* TODO: share this branch selector dropdown with the same in repo page */}}
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button"> <div class="ui basic small button">
<span class="text branch-name">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span> <span class="text branch-name">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span>
{{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}} {{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
@ -39,7 +39,7 @@
{{range .Branches}} {{range .Branches}}
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div> <div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
{{else}} {{else}}
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div> <div class="item">{{ctx.Locale.Tr "repo.pulls.no_results"}}</div>
{{end}} {{end}}
</div> </div>
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} gt-hidden"> <div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} gt-hidden">
@ -49,7 +49,7 @@
{{range .Tags}} {{range .Tags}}
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div> <div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
{{else}} {{else}}
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div> <div class="item">{{ctx.Locale.Tr "repo.pulls.no_results"}}</div>
{{end}} {{end}}
</div> </div>
</div> </div>

View file

@ -88,7 +88,7 @@
</div> </div>
</div> </div>
{{svg "octicon-arrow-right"}} {{svg "octicon-arrow-right"}}
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button"> <div class="ui basic small button">
<span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{ctx.Locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span> <span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{ctx.Locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}

View file

@ -5,7 +5,7 @@
<div class="ui container"> <div class="ui container">
<div class="repo-button-row"> <div class="repo-button-row">
<div class="gt-df gt-ac"> <div class="gt-df gt-ac">
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button"> <div class="ui basic small button">
<span class="text"> <span class="text">
{{ctx.Locale.Tr "repo.wiki.page"}}: {{ctx.Locale.Tr "repo.wiki.page"}}: