Skip to content

Commit 8a4eb2d

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Bump relative-time-element to v4.4.3 (go-gitea#31910) [skip ci] Updated translations via Crowdin Use correct function name (go-gitea#31887) Move lock icon position and add additional tooltips to branch list page (go-gitea#31839) Don't return 500 if mirror url contains special chars (go-gitea#31859)
2 parents e1e2e87 + 5fd3b09 commit 8a4eb2d

File tree

6 files changed

+30
-18
lines changed

6 files changed

+30
-18
lines changed

modules/migration/pullrequest.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (p *PullRequest) GetContext() DownloaderContext { return p.Context }
4545

4646
// IsForkPullRequest returns true if the pull request from a forked repository but not the same repository
4747
func (p *PullRequest) IsForkPullRequest() bool {
48-
return p.Head.RepoPath() != p.Base.RepoPath()
48+
return p.Head.RepoFullName() != p.Base.RepoFullName()
4949
}
5050

5151
// GetGitRefName returns pull request relative path to head
@@ -62,8 +62,8 @@ type PullRequestBranch struct {
6262
OwnerName string `yaml:"owner_name"`
6363
}
6464

65-
// RepoPath returns pull request repo path
66-
func (p PullRequestBranch) RepoPath() string {
65+
// RepoFullName returns pull request repo full name
66+
func (p PullRequestBranch) RepoFullName() string {
6767
return fmt.Sprintf("%s/%s", p.OwnerName, p.RepoName)
6868
}
6969

options/locale/locale_pt-PT.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ org_still_own_repo=Esta organização ainda possui um ou mais repositórios, eli
628628
org_still_own_packages=Esta organização ainda possui um ou mais pacotes, elimine-os primeiro.
629629

630630
target_branch_not_exist=O ramo de destino não existe.
631+
target_ref_not_exist=A referência de destino não existe %s
631632

632633
admin_cannot_delete_self=Não se pode auto-remover quando tem privilégios de administração. Remova esses privilégios primeiro.
633634

@@ -1273,6 +1274,7 @@ commit_graph.color=Colorido
12731274
commit.contained_in=Este cometimento está contido em:
12741275
commit.contained_in_default_branch=Este cometimento é parte do ramo principal
12751276
commit.load_referencing_branches_and_tags=Carregar ramos e etiquetas que referenciem este cometimento
1277+
commit.load_tags_failed=O carregamento das etiquetas falhou por causa de um erro interno
12761278
blame=Responsabilidade
12771279
download_file=Descarregar ficheiro
12781280
normal_view=Vista normal
@@ -3700,6 +3702,11 @@ workflow.disable_success=A sequência de trabalho '%s' foi desabilitada com suce
37003702
workflow.enable=Habilitar sequência de trabalho
37013703
workflow.enable_success=A sequência de trabalho '%s' foi habilitada com sucesso.
37023704
workflow.disabled=A sequência de trabalho está desabilitada.
3705+
workflow.run=Executar sequência de trabalho
3706+
workflow.not_found=A sequência de trabalho '%s' não foi encontrada.
3707+
workflow.run_success=A sequência de trabalho '%s' foi executada com sucesso.
3708+
workflow.from_ref=Usar sequência de trabalho de
3709+
workflow.has_workflow_dispatch=Esta sequência de trabalho tem um despoletador de eventos workflow_dispatch.
37033710

37043711
need_approval_desc=É necessária aprovação para executar sequências de trabalho para a derivação do pedido de integração.
37053712

package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@citation-js/plugin-csl": "0.7.14",
1010
"@citation-js/plugin-software-formats": "0.6.1",
1111
"@github/markdown-toolbar-element": "2.2.3",
12-
"@github/relative-time-element": "4.4.2",
12+
"@github/relative-time-element": "4.4.3",
1313
"@github/text-expander-element": "2.7.1",
1414
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
1515
"@primer/octicons": "19.11.0",

routers/web/repo/setting/setting.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ func SettingsPost(ctx *context.Context) {
240240

241241
remoteAddress, err := util.SanitizeURL(form.MirrorAddress)
242242
if err != nil {
243-
ctx.ServerError("SanitizeURL", err)
243+
ctx.Data["Err_MirrorAddress"] = true
244+
handleSettingRemoteAddrError(ctx, err, form)
244245
return
245246
}
246247
pullMirror.RemoteAddress = remoteAddress
@@ -401,7 +402,8 @@ func SettingsPost(ctx *context.Context) {
401402

402403
remoteAddress, err := util.SanitizeURL(form.PushMirrorAddress)
403404
if err != nil {
404-
ctx.ServerError("SanitizeURL", err)
405+
ctx.Data["Err_PushMirrorAddress"] = true
406+
handleSettingRemoteAddrError(ctx, err, form)
405407
return
406408
}
407409

templates/repo/branch/list.tmpl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
<tr>
2121
<td>
2222
<div class="flex-text-block">
23-
{{if .DefaultBranchBranch.IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
2423
<a class="gt-ellipsis" href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{.DefaultBranchBranch.DBBranch.Name}}</a>
25-
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
24+
{{if .DefaultBranchBranch.IsProtected}}
25+
<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.protected_branch"}}">{{svg "octicon-shield-lock"}}</span>
26+
{{end}}
27+
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
2628
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
2729
</div>
2830
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
@@ -39,7 +41,7 @@
3941
</button>
4042
{{end}}
4143
{{if .EnableFeed}}
42-
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
44+
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss"}}</a>
4345
{{end}}
4446
{{if not $.DisableDownloadSourceArchives}}
4547
<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
@@ -88,14 +90,16 @@
8890
{{if .DBBranch.IsDeleted}}
8991
<div class="flex-text-block">
9092
<span class="gt-ellipsis">{{.DBBranch.Name}}</span>
91-
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
93+
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
9294
</div>
9395
<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}</p>
9496
{{else}}
9597
<div class="flex-text-block">
96-
{{if .IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
9798
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
98-
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
99+
{{if .IsProtected}}
100+
<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.protected_branch"}}">{{svg "octicon-shield-lock"}}</span>
101+
{{end}}
102+
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
99103
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
100104
</div>
101105
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} &nbsp;{{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
@@ -156,7 +160,7 @@
156160
</button>
157161
{{end}}
158162
{{if $.EnableFeed}}
159-
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
163+
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss"}}</a>
160164
{{end}}
161165
{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
162166
<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" (.DBBranch.Name)}}">

0 commit comments

Comments
 (0)