feat(i18n): allow different translations of creation links and titles (#4829)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4829
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
0ko 2024-08-07 16:54:05 +00:00
parent 690b63fc74
commit bad3b32037
13 changed files with 115 additions and 15 deletions

View file

@ -126,16 +126,16 @@
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo.link"}}
</a>
{{if not .DisableMigrations}}
<a class="item" href="{{AppSubUrl}}/repo/migrate">
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate.link"}}
</a>
{{end}}
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org.link"}}
</a>
{{end}}
</div><!-- end content create new menu -->

View file

@ -5,7 +5,7 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{ctx.Locale.Tr "new_org"}}
{{ctx.Locale.Tr "new_org.title"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}

View file

@ -22,9 +22,9 @@
<div class="ui five wide column">
{{if .CanCreateOrgRepo}}
<div class="center aligned">
<a class="ui primary button tw-mb-1" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
<a class="ui primary button tw-mb-1" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo.link"}}</a>
{{if not .DisableNewPullMirrors}}
<a class="ui primary button tw-mb-1" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
<a class="ui primary button tw-mb-1" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate.link"}}</a>
{{end}}
</div>
<div class="divider"></div>

View file

@ -5,7 +5,7 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{ctx.Locale.Tr "new_repo"}}
{{ctx.Locale.Tr "new_repo.title"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}