From 7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 25 Sep 2023 10:56:50 +0200 Subject: Always use `ctx.Locale.Tr` inside templates (#27231) --- templates/repo/settings/branches.tmpl | 22 +- templates/repo/settings/collaboration.tmpl | 38 +- templates/repo/settings/deploy_keys.tmpl | 34 +- templates/repo/settings/githook_edit.tmpl | 10 +- templates/repo/settings/githooks.tmpl | 4 +- templates/repo/settings/lfs.tmpl | 16 +- templates/repo/settings/lfs_file.tmpl | 18 +- templates/repo/settings/lfs_file_find.tmpl | 8 +- templates/repo/settings/lfs_locks.tmpl | 14 +- templates/repo/settings/lfs_pointers.tmpl | 16 +- templates/repo/settings/nav.tmpl | 18 +- templates/repo/settings/navbar.tmpl | 26 +- templates/repo/settings/options.tmpl | 450 ++++++++++----------- templates/repo/settings/protected_branch.tmpl | 108 ++--- .../repo/settings/push_mirror_sync_modal.tmpl | 10 +- templates/repo/settings/tags.tmpl | 34 +- templates/repo/settings/webhook/base_list.tmpl | 24 +- templates/repo/settings/webhook/delete_modal.tmpl | 4 +- templates/repo/settings/webhook/dingtalk.tmpl | 4 +- templates/repo/settings/webhook/discord.tmpl | 8 +- templates/repo/settings/webhook/feishu.tmpl | 6 +- templates/repo/settings/webhook/gitea.tmpl | 10 +- templates/repo/settings/webhook/gogs.tmpl | 8 +- templates/repo/settings/webhook/history.tmpl | 20 +- templates/repo/settings/webhook/matrix.tmpl | 8 +- templates/repo/settings/webhook/msteams.tmpl | 4 +- templates/repo/settings/webhook/new.tmpl | 4 +- templates/repo/settings/webhook/packagist.tmpl | 8 +- templates/repo/settings/webhook/settings.tmpl | 116 +++--- templates/repo/settings/webhook/slack.tmpl | 12 +- templates/repo/settings/webhook/telegram.tmpl | 8 +- templates/repo/settings/webhook/wechatwork.tmpl | 4 +- 32 files changed, 537 insertions(+), 537 deletions(-) (limited to 'templates/repo/settings') diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index 43203a7ad3..fbdc12defb 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -2,15 +2,15 @@
{{if .Repository.IsArchived}}
- {{.locale.Tr "repo.settings.archive.branchsettings_unavailable"}} + {{ctx.Locale.Tr "repo.settings.archive.branchsettings_unavailable"}}
{{else}}

- {{.locale.Tr "repo.default_branch"}} + {{ctx.Locale.Tr "repo.default_branch"}}

- {{.locale.Tr "repo.settings.default_branch_desc"}} + {{ctx.Locale.Tr "repo.settings.default_branch_desc"}}

{{.CsrfTokenHtml}} @@ -26,15 +26,15 @@ {{end}}
- + {{end}}

- {{.locale.Tr "repo.settings.protected_branch"}} + {{ctx.Locale.Tr "repo.settings.protected_branch"}}

@@ -48,15 +48,15 @@
- {{$.locale.Tr "repo.settings.edit_protected_branch"}} + {{ctx.Locale.Tr "repo.settings.edit_protected_branch"}}
{{else}}
- {{.locale.Tr "repo.settings.no_protected_branch"}} + {{ctx.Locale.Tr "repo.settings.no_protected_branch"}}
{{end}} @@ -67,10 +67,10 @@ diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 290a1ae093..0844ebeaa4 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -1,7 +1,7 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings collaboration")}}

- {{.locale.Tr "repo.settings.collaboration"}} + {{ctx.Locale.Tr "repo.settings.collaboration"}}

{{if .Collaborators}}
@@ -20,17 +20,17 @@
{{svg "octicon-shield-lock"}}
@@ -42,15 +42,15 @@
{{.CsrfTokenHtml}} - +
{{if .RepoOwnerIsOrganization}}

- {{$.locale.Tr "repo.settings.teams"}} + {{ctx.Locale.Tr "repo.settings.teams"}}

{{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}} {{if .Teams}} @@ -64,19 +64,19 @@
{{svg "octicon-shield-lock"}} - {{if eq .AccessMode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}} + {{if eq .AccessMode 1}}{{ctx.Locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{ctx.Locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}} {{$first := true}} -
- Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} +
+ Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ctx.Locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
{{end}}
{{if $allowedToChangeTeams}} -
+
{{end}} @@ -90,13 +90,13 @@
{{.CsrfTokenHtml}} - +
{{else}}
- {{$.locale.Tr "repo.settings.change_team_access_not_allowed"}} + {{ctx.Locale.Tr "repo.settings.change_team_access_not_allowed"}}
{{end}}
@@ -106,10 +106,10 @@ diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index a7b7dd6511..7f60c567b1 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -1,12 +1,12 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}}

- {{.locale.Tr "repo.settings.deploy_keys"}} + {{ctx.Locale.Tr "repo.settings.deploy_keys"}}
{{if not .DisableSSH}} - + {{else}} - + {{end}}

@@ -15,30 +15,30 @@
{{.CsrfTokenHtml}}
- {{.locale.Tr "repo.settings.deploy_key_desc"}} + {{ctx.Locale.Tr "repo.settings.deploy_key_desc"}}
- +
- - + +
- {{$.locale.Tr "repo.settings.is_writable_info" | Str2html}} + {{ctx.Locale.Tr "repo.settings.is_writable_info" | Str2html}}
@@ -47,7 +47,7 @@ {{range .Deploykeys}}
- {{svg "octicon-key" 32}} + {{svg "octicon-key" 32}}
{{.Name}}
@@ -55,19 +55,19 @@ {{.Fingerprint}}
- {{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - {{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}} + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - {{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}
{{end}} {{else}} - {{.locale.Tr "repo.settings.no_deploy_keys"}} + {{ctx.Locale.Tr "repo.settings.no_deploy_keys"}} {{end}} @@ -75,10 +75,10 @@ diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl index c2fabd02ed..db8982a282 100644 --- a/templates/repo/settings/githook_edit.tmpl +++ b/templates/repo/settings/githook_edit.tmpl @@ -1,24 +1,24 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit githook")}}

- {{.locale.Tr "repo.settings.githooks"}} + {{ctx.Locale.Tr "repo.settings.githooks"}}

-

{{.locale.Tr "repo.settings.githook_edit_desc"}}

+

{{ctx.Locale.Tr "repo.settings.githook_edit_desc"}}

{{.CsrfTokenHtml}} {{with .Hook}}
- + {{.Name}}
- +
- +
{{end}}
diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 75729108fa..389d381f30 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -1,12 +1,12 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings githooks")}}

- {{.locale.Tr "repo.settings.githooks"}} + {{ctx.Locale.Tr "repo.settings.githooks"}}

- {{.locale.Tr "repo.settings.githooks_desc" | Str2html}} + {{ctx.Locale.Tr "repo.settings.githooks_desc" | Str2html}}
{{range .Hooks}}
diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl index 06ccb92c30..f30e480e26 100644 --- a/templates/repo/settings/lfs.tmpl +++ b/templates/repo/settings/lfs.tmpl @@ -1,10 +1,10 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}

- {{.locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}}) + {{ctx.Locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}})

@@ -19,15 +19,15 @@ {{else}} - + {{end}} @@ -36,11 +36,11 @@ {{range .LFSFiles}} {{if .IsFileTooLarge}} - + {{else}} diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index b85f67fb43..0ffb637511 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -2,7 +2,7 @@
{{FileSize .Size}} {{TimeSince .CreatedUnix.AsTime $.locale}} - {{$.locale.Tr "repo.settings.lfs_findcommits"}} + {{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}
{{.locale.Tr "repo.settings.lfs_no_lfs_files"}}{{ctx.Locale.Tr "repo.settings.lfs_no_lfs_files"}}
{{.locale.Tr "repo.file_too_large"}}{{ctx.Locale.Tr "repo.file_too_large"}}{{.LineNums}}
    {{.FileContent}}
@@ -24,19 +24,19 @@ {{else}} - + {{end}} diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl index 4eadf9ca32..0e389ea6b8 100644 --- a/templates/repo/settings/lfs_locks.tmpl +++ b/templates/repo/settings/lfs_locks.tmpl @@ -2,14 +2,14 @@

- {{.locale.Tr "repo.settings.lfs"}} / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}}) + {{ctx.Locale.Tr "repo.settings.lfs"}} / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}})

{{$.CsrfTokenHtml}}
- - + +
@@ -23,10 +23,10 @@ {{$lock.Path}} {{else}} {{svg "octicon-diff"}} - {{$lock.Path}} + {{$lock.Path}} {{end}} {{if not (index $.Lockables $index)}} - {{svg "octicon-alert"}} + {{svg "octicon-alert"}} {{end}}
{{else}} - + {{end}} diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl index db3fdd2f85..1f710869bb 100644 --- a/templates/repo/settings/lfs_pointers.tmpl +++ b/templates/repo/settings/lfs_pointers.tmpl @@ -1,7 +1,7 @@ {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}

- {{.locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}} + {{ctx.Locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}} {{if gt .NumAssociatable 0}}
@@ -11,7 +11,7 @@ {{end}} {{end}} - +
{{end}} @@ -20,11 +20,11 @@

{{if .ParentHashes}} - {{$.locale.Tr "repo.diff.parent"}} + {{ctx.Locale.Tr "repo.diff.parent"}} {{range .ParentHashes}} {{ShortSha .String}} {{end}} {{end}} - {{$.locale.Tr "repo.diff.commit"}} + {{ctx.Locale.Tr "repo.diff.commit"}} {{ShortSha .SHA}} {{TimeSince .When $.locale}}
{{.locale.Tr "repo.settings.lfs_lfs_file_no_commits"}}{{ctx.Locale.Tr "repo.settings.lfs_lfs_file_no_commits"}}
@@ -39,13 +39,13 @@
{{$.CsrfTokenHtml}} - +
{{.locale.Tr "repo.settings.lfs_locks_no_locks"}}{{ctx.Locale.Tr "repo.settings.lfs_locks_no_locks"}}
- - - - - + + + + + @@ -45,7 +45,7 @@ {{end}} diff --git a/templates/repo/settings/nav.tmpl b/templates/repo/settings/nav.tmpl index 4a88d69adf..93ecb3877b 100644 --- a/templates/repo/settings/nav.tmpl +++ b/templates/repo/settings/nav.tmpl @@ -1,19 +1,19 @@ diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index 390cc5022d..74c4b86c68 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -1,50 +1,50 @@
{{.locale.Tr "repo.settings.lfs_pointers.sha"}}{{.locale.Tr "repo.settings.lfs_pointers.oid"}}{{.locale.Tr "repo.settings.lfs_pointers.inRepo"}}{{.locale.Tr "repo.settings.lfs_pointers.exists"}}{{.locale.Tr "repo.settings.lfs_pointers.accessible"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.sha"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.oid"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.inRepo"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.exists"}}{{.locale.Tr "repo.settings.lfs_pointers.accessible"}}
{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} {{if .Accessible}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} - {{$.locale.Tr "repo.settings.lfs_findcommits"}} + {{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}
{{if $existingPushMirror}} - - - + + + @@ -116,7 +116,7 @@ @@ -124,13 +124,13 @@ - + @@ -141,55 +141,55 @@ {{.CsrfTokenHtml}}
- +
- +
- +
{{$address := MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName false}}
- + -

{{.locale.Tr "repo.mirror_address_desc"}}

+

{{ctx.Locale.Tr "repo.mirror_address_desc"}}

- {{.locale.Tr "repo.need_auth"}} + {{ctx.Locale.Tr "repo.need_auth"}}
- +
- - + +
-

{{.locale.Tr "repo.mirror_password_help"}}

+

{{ctx.Locale.Tr "repo.mirror_password_help"}}

{{if .LFSStartServer}}
- +
- +
- - -

{{.locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}

+ + +

{{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}

{{end}}
- +
@@ -201,13 +201,13 @@ {{range .PushMirrors}} - - + + {{else}} - + {{end}} {{if (not .DisableNewPushMirrors)}} @@ -241,21 +241,21 @@ {{.CsrfTokenHtml}}
- + -

{{.locale.Tr "repo.mirror_address_desc"}}

+

{{ctx.Locale.Tr "repo.mirror_address_desc"}}

- {{.locale.Tr "repo.need_auth"}} + {{ctx.Locale.Tr "repo.need_auth"}}
- +
- +
@@ -263,15 +263,15 @@
- +
- +
- +
@@ -283,7 +283,7 @@ {{end}}

- {{.locale.Tr "repo.settings.advanced_settings"}} + {{ctx.Locale.Tr "repo.settings.advanced_settings"}}

@@ -293,10 +293,10 @@ {{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}} {{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}}
- -
+ +
- +
@@ -305,29 +305,29 @@ {{$isExternalWikiGlobalDisabled := .UnitTypeExternalWiki.UnitGlobalDisabled}} {{$isBothWikiGlobalDisabled := and $isWikiGlobalDisabled $isExternalWikiGlobalDisabled}}
- -
+ +
- +
-
+
- +
-
+
- +
- + -

{{.locale.Tr "repo.settings.external_wiki_url_desc"}}

+

{{ctx.Locale.Tr "repo.settings.external_wiki_url_desc"}}

@@ -338,17 +338,17 @@ {{$isExternalTrackerGlobalDisabled := .UnitTypeExternalTracker.UnitGlobalDisabled}} {{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}}
- -
+ +
- +
-
+
- +
@@ -356,71 +356,71 @@
- +
- +
{{end}}
- +
- +
-
+
- +
- + -

{{.locale.Tr "repo.settings.external_tracker_url_desc"}}

+

{{ctx.Locale.Tr "repo.settings.external_tracker_url_desc"}}

- + -

{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}

+

{{ctx.Locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}

- +
{{$externalTracker := (.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker)}} {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}} - +
- +
- +
- + -

{{.locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}

+

{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}

@@ -430,30 +430,30 @@ {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} {{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}}
- -
+ +
- +
{{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}} {{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}}
- -
+ +
- +
{{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} {{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}}
- -
+ +
- +
@@ -461,10 +461,10 @@ {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} {{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}}
- -
+ +
- +
{{end}} @@ -475,110 +475,110 @@ {{$pullRequestGlobalDisabled := .UnitTypePullRequests.UnitGlobalDisabled}} {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}}
- -
+ +
- +

- {{.locale.Tr "repo.settings.merge_style_desc"}} + {{ctx.Locale.Tr "repo.settings.merge_style_desc"}}

- +
- +
- +
- +
- +

- {{.locale.Tr "repo.settings.default_merge_style_desc"}} + {{ctx.Locale.Tr "repo.settings.default_merge_style_desc"}}

- +
- +
- +
- +
- +
@@ -586,60 +586,60 @@
- +

- {{.locale.Tr "repo.settings.signing_settings"}} + {{ctx.Locale.Tr "repo.settings.signing_settings"}}

{{.CsrfTokenHtml}}
-
+
- -

{{.locale.Tr "repo.settings.trust_model.default.desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.trust_model.default.desc"}}

- -

{{.locale.Tr "repo.settings.trust_model.collaborator.desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.trust_model.collaborator.desc"}}

- -

{{.locale.Tr "repo.settings.trust_model.committer.desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.trust_model.committer.desc"}}

- -

{{.locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}

- +
{{if .IsAdmin}}

- {{.locale.Tr "repo.settings.admin_settings"}} + {{ctx.Locale.Tr "repo.settings.admin_settings"}}

@@ -648,12 +648,12 @@
- +
- +
@@ -662,27 +662,27 @@ {{.CsrfTokenHtml}} {{if .CodeIndexerEnabled}} -

{{.locale.Tr "repo.settings.admin_code_indexer"}}

+

{{ctx.Locale.Tr "repo.settings.admin_code_indexer"}}

- + {{if .CodeIndexerStatus}} {{ShortSha .CodeIndexerStatus.CommitSha}} {{else}} - {{.locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} {{end}}
- +
{{end}} -

{{.locale.Tr "repo.settings.admin_stats_indexer"}}

+

{{ctx.Locale.Tr "repo.settings.admin_stats_indexer"}}

{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} - + {{end}} {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} @@ -690,11 +690,11 @@ {{ShortSha .StatsIndexerStatus.CommitSha}} {{else}} - {{.locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} {{end}}
- +
@@ -703,40 +703,40 @@ {{if .Permission.IsOwner}}

- {{.locale.Tr "repo.settings.danger_zone"}} + {{ctx.Locale.Tr "repo.settings.danger_zone"}}

{{if .Repository.IsMirror}}
-
{{.locale.Tr "repo.settings.convert"}}
-
{{.locale.Tr "repo.settings.convert_desc"}}
+
{{ctx.Locale.Tr "repo.settings.convert"}}
+
{{ctx.Locale.Tr "repo.settings.convert_desc"}}
- +
{{end}} {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
-
{{.locale.Tr "repo.settings.convert_fork"}}
-
{{.locale.Tr "repo.settings.convert_fork_desc"}}
+
{{ctx.Locale.Tr "repo.settings.convert_fork"}}
+
{{ctx.Locale.Tr "repo.settings.convert_fork_desc"}}
- +
{{end}}
-
{{.locale.Tr "repo.settings.transfer"}}
+
{{ctx.Locale.Tr "repo.settings.transfer"}}
{{if .RepoTransfer}} - {{.locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}} + {{ctx.Locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}} {{else}} - {{.locale.Tr "repo.settings.transfer_desc"}} + {{ctx.Locale.Tr "repo.settings.transfer_desc"}} {{end}}
@@ -745,50 +745,50 @@
{{.CsrfTokenHtml}} - + {{else}} - + {{end}}
{{if .Permission.CanRead $.UnitTypeWiki}}
-
{{.locale.Tr "repo.settings.wiki_delete"}}
-
{{.locale.Tr "repo.settings.wiki_delete_desc"}}
+
{{ctx.Locale.Tr "repo.settings.wiki_delete"}}
+
{{ctx.Locale.Tr "repo.settings.wiki_delete_desc"}}
- +
{{end}}
-
{{.locale.Tr "repo.settings.delete"}}
-
{{.locale.Tr "repo.settings.delete_desc"}}
+
{{ctx.Locale.Tr "repo.settings.delete"}}
+
{{ctx.Locale.Tr "repo.settings.delete_desc"}}
- +
{{if not .Repository.IsMirror}}
{{if .Repository.IsArchived}} -
{{.locale.Tr "repo.settings.unarchive.header"}}
-
{{.locale.Tr "repo.settings.unarchive.text"}}
+
{{ctx.Locale.Tr "repo.settings.unarchive.header"}}
+
{{ctx.Locale.Tr "repo.settings.unarchive.text"}}
{{else}} -
{{.locale.Tr "repo.settings.archive.header"}}
-
{{.locale.Tr "repo.settings.archive.text"}}
+
{{ctx.Locale.Tr "repo.settings.archive.header"}}
+
{{ctx.Locale.Tr "repo.settings.archive.text"}}
{{end}}
@@ -804,29 +804,29 @@ {{if .Repository.IsMirror}}
{{$.locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}{{$.locale.Tr "repo.settings.mirror_settings.direction"}}{{$.locale.Tr "repo.settings.mirror_settings.last_update"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}
-
{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{$.locale.Tr "error.occurred"}}
+
{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}
{{.PullMirror.RemoteAddress}}{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}} {{DateTime "full" .PullMirror.UpdatedUnix}}
{{.CsrfTokenHtml}} - +
{{.RemoteAddress}}{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}
{{$.locale.Tr "error"}}
{{end}}
{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}
{{ctx.Locale.Tr "error"}}
{{end}}
+
{{$.CsrfTokenHtml}} - +
{{$.locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}
- + @@ -171,7 +171,7 @@ {{else}} @@ -181,28 +181,28 @@
{{.locale.Tr "repo.settings.protect_check_status_contexts_list"}}{{ctx.Locale.Tr "repo.settings.protect_check_status_contexts_list"}}
{{.}} - {{$.locale.Tr "repo.settings.protect_status_check_matched"}} + {{ctx.Locale.Tr "repo.settings.protect_status_check_matched"}}
-
{{.locale.Tr "repo.settings.event_pull_request_merge"}}
+
{{ctx.Locale.Tr "repo.settings.event_pull_request_merge"}}
- -

{{.locale.Tr "repo.settings.protect_enable_merge_desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.protect_enable_merge_desc"}}

- -

{{.locale.Tr "repo.settings.protect_merge_whitelist_committers_desc"}}

+ +

{{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_committers_desc"}}

- +