Skip to content

Commit bb114a4

Browse files
committed
Include PR number in the translatable sentence
1 parent 5812024 commit bb114a4

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ commit_graph.color = Color
13221322
commit.contained_in = This commit is contained in:
13231323
commit.contained_in_default_branch = This commit is part of the default branch
13241324
commit.load_referencing_branches_and_tags = Load branches and tags referencing this commit
1325-
commit.merged_in_pr = This commit was merged in pull request:
1325+
commit.merged_in_pr = This commit was merged in pull request <a href="%s">#%d</a>.
13261326
blame = Blame
13271327
download_file = Download file
13281328
normal_view = Normal View

routers/web/repo/commit.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ func Diff(ctx *context.Context) {
415415
pr, _ := issues_model.GetPullRequestByMergedCommit(ctx, ctx.Repo.Repository.ID, commitID)
416416
if pr != nil {
417417
ctx.Data["PRNumber"] = pr.Index
418+
ctx.Data["PRLink"] = fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, pr.Index)
418419
}
419420

420421
ctx.HTML(http.StatusOK, tplCommitPage)

templates/repo/commit_load_branches_and_tags.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{if .PRNumber}}
44
<div class="pr-detail">
55
<div class="divider"></div>
6-
<div>{{ctx.Locale.Tr "repo.commit.merged_in_pr"}} <a href="{{.RepoLink}}/pulls/{{.PRNumber}}">#{{.PRNumber}}</a></div>
6+
<div>{{ctx.Locale.Tr "repo.commit.merged_in_pr" .PRLink .PRNumber}}</div>
77
</div>
88
{{end}}
99
<button class="ui button ellipsis-button load-branches-and-tags tw-mt-2" aria-expanded="false"

0 commit comments

Comments
 (0)