Skip to content

Commit b4e2d5e

Browse files
GiteaBotwxiaoguang
andauthored
Add a confirm dialog for "sync fork" (#33270) (#33273)
Backport #33270 by @wxiaoguang Try to quickly fix #33264 Co-authored-by: wxiaoguang <[email protected]>
1 parent 2984a7c commit b4e2d5e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

options/locale/locale_en-US.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,7 @@ pulls.upstream_diverging_prompt_behind_1 = This branch is %[1]d commit behind %[
19511951
pulls.upstream_diverging_prompt_behind_n = This branch is %[1]d commits behind %[2]s
19521952
pulls.upstream_diverging_prompt_base_newer = The base branch %s has new changes
19531953
pulls.upstream_diverging_merge = Sync fork
1954+
pulls.upstream_diverging_merge_confirm = Would you like to merge base repository's default branch onto this repository's branch %s?
19541955

19551956
pull.deleted_branch = (deleted):%s
19561957
pull.agit_documentation = Review documentation about AGit

templates/repo/code/upstream_diverging_info.tmpl

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
{{end}}
1111
</div>
1212
{{if .CanWriteCode}}
13-
<button class="ui compact primary button tw-m-0 link-action" data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}">
13+
<button class="ui compact primary button tw-m-0 link-action"
14+
data-modal-confirm-header="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}"
15+
data-modal-confirm-content="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge_confirm" .BranchName}}"
16+
data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}">
1417
{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}
1518
</button>
1619
{{end}}

0 commit comments

Comments
 (0)