aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/member
diff options
context:
space:
mode:
authordelvh <dev.lh@web.de>2023-09-25 10:56:50 +0200
committerGitHub <noreply@github.com>2023-09-25 08:56:50 +0000
commit7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch)
treecfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/org/member
parente6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff)
downloadgitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz
gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/org/member')
-rw-r--r--templates/org/member/members.tmpl24
1 files changed, 12 insertions, 12 deletions
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl
index 65ef7b66e7..e4ddb69805 100644
--- a/templates/org/member/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -15,17 +15,17 @@
<div class="flex-item-title">
{{template "shared/user/name" .}}
{{if not $isPublic}}
- <span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span>
+ <span class="ui basic tiny label">{{ctx.Locale.Tr "org.members.private"}}</span>
{{end}}
</div>
{{if not $.PublicOnly}}
<div class="flex-item-body">
- {{$.locale.Tr "org.members.member_role"}}
- <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
+ {{ctx.Locale.Tr "org.members.member_role"}}
+ <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}}</strong>
</div>
{{if $.IsOrganizationOwner}}
<div class="flex-item-body">
- {{$.locale.Tr "admin.users.2fa"}}
+ {{ctx.Locale.Tr "admin.users.2fa"}}
<strong>
{{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check"}}</span>
@@ -40,9 +40,9 @@
<div class="flex-item-trailing">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
{{if $isPublic}}
- <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}}</a>
+ <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
{{else}}
- <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}}</a>
+ <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
{{end}}
{{end}}
{{if eq $.SignedUser.ID .ID}}
@@ -50,14 +50,14 @@
<button class="ui red tiny button delete-button" data-modal-id="leave-organization"
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
- data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form>
<button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
- data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
@@ -70,19 +70,19 @@
</div>
<div class="ui g-modal-confirm delete modal" id="leave-organization">
<div class="header">
- {{$.locale.Tr "org.members.leave"}}
+ {{ctx.Locale.Tr "org.members.leave"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
<div class="ui g-modal-confirm delete modal" id="remove-organization-member">
<div class="header">
- {{$.locale.Tr "org.members.remove"}}
+ {{ctx.Locale.Tr "org.members.remove"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>