feat(i18n): Branch protection improvements

- adds a header to indicate creating a new rule
  - test that header is different between new and edit form
- consistently avoids colons in the form
- excludes some accessibility checks that require a global solution for
  forms
This commit is contained in:
Otto Richter 2024-08-18 00:33:50 +02:00
parent 3bbd129270
commit 00276dfc30
4 changed files with 40 additions and 13 deletions

View file

@ -1,7 +1,11 @@
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings branches")}}
<div class="repo-setting-content">
<h4 class="ui top attached header">
{{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}}
{{if .Rule.RuleName}}
{{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}}
{{else}}
{{ctx.Locale.Tr "repo.settings.protect_new_rule"}}
{{end}}
</h4>
<form class="ui form attached segment" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}