mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-21 13:42:36 +08:00
daaf0ad473
Backport #27227 by @denyskon Throughout the Gitea codebase, you can meet some weird constructions to make `locale.Tr` work in subtemplates. Since we now have `ctx.Locale.Tr` which solves that problem, clean up various templates which pass `locale` through `dict` or use some weird constructions like `$.root.locale` Going on, it would be great to replace every case of `$.locale.Tr` and `.locale.Tr` with `ctx.Locale.Tr`, but that needs to be done with patience. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
20 lines
1.1 KiB
Handlebars
20 lines
1.1 KiB
Handlebars
<div class="divider"></div>
|
|
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
|
|
<div class="instruct-content gt-mt-3 gt-hidden">
|
|
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
|
|
<div class="ui secondary segment">
|
|
{{if eq .Flow 0}}
|
|
<div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div>
|
|
<div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div>
|
|
{{else}}
|
|
<div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div>
|
|
{{end}}
|
|
</div>
|
|
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div>
|
|
<div class="ui secondary segment">
|
|
<div>git checkout {{.BaseBranch}}</div>
|
|
<div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div>
|
|
<div>git push origin {{.BaseBranch}}</div>
|
|
</div>
|
|
</div>
|