Reserve the locale param, carry it on breadcrumbs, translate the permissions detail view
CI / full-gate (push) Successful in 2m38s
CI / full-gate (push) Successful in 2m38s
This commit is contained in:
@@ -81,6 +81,10 @@ const messages = {
|
||||
"admin.notFound.message": "That item doesn't exist.",
|
||||
"admin.notFound.title": "Not found",
|
||||
|
||||
"admin.permissions.actions": "Permission actions",
|
||||
"admin.permissions.allAssigned": "All users and groups already have this permission.",
|
||||
"admin.permissions.assign": "Assign the permission",
|
||||
"admin.permissions.assignAction": "Assign",
|
||||
"admin.permissions.assignTo": "Assign to",
|
||||
"admin.permissions.assignedTo": "Assigned to",
|
||||
"admin.permissions.column.members": "Members",
|
||||
@@ -90,10 +94,13 @@ const messages = {
|
||||
"admin.permissions.deleteMessage": "Delete permission {{name}}? This revokes it from everyone it's assigned to.",
|
||||
"admin.permissions.error.adminUndeletable": "The admin permission can't be deleted — it would remove all admin access.",
|
||||
"admin.permissions.error.selfRevoke": "You can't revoke your own admin access.",
|
||||
"admin.permissions.effective": "Effective access",
|
||||
"admin.permissions.effectiveHint": "Everyone who holds this permission — directly or through a group (resolved by Keto).",
|
||||
"admin.permissions.field.name": "Permission name",
|
||||
"admin.permissions.field.nameHint": "Lowercase letters, digits, dashes and underscores.",
|
||||
"admin.permissions.filter": "Filter permissions",
|
||||
"admin.permissions.new": "New permission",
|
||||
"admin.permissions.noEffective": "No users hold this permission yet.",
|
||||
"admin.permissions.noMembers": "Not assigned to anyone yet.",
|
||||
"admin.permissions.pagination": "Permissions pagination",
|
||||
"admin.permissions.revoke": "Revoke",
|
||||
|
||||
@@ -81,6 +81,10 @@ const messages: AdminMessages = {
|
||||
"admin.notFound.message": "Objektet finns inte.",
|
||||
"admin.notFound.title": "Hittades inte",
|
||||
|
||||
"admin.permissions.actions": "Behörighetsåtgärder",
|
||||
"admin.permissions.allAssigned": "Alla användare och grupper har redan den här behörigheten.",
|
||||
"admin.permissions.assign": "Tilldela behörigheten",
|
||||
"admin.permissions.assignAction": "Tilldela",
|
||||
"admin.permissions.assignTo": "Tilldela till",
|
||||
"admin.permissions.assignedTo": "Tilldelad till",
|
||||
"admin.permissions.column.members": "Medlemmar",
|
||||
@@ -90,10 +94,13 @@ const messages: AdminMessages = {
|
||||
"admin.permissions.deleteMessage": "Ta bort behörigheten {{name}}? Den återkallas från alla den är tilldelad till.",
|
||||
"admin.permissions.error.adminUndeletable": "Behörigheten admin kan inte tas bort — det skulle ta bort all administratörsåtkomst.",
|
||||
"admin.permissions.error.selfRevoke": "Du kan inte återkalla din egen administratörsåtkomst.",
|
||||
"admin.permissions.effective": "Faktisk åtkomst",
|
||||
"admin.permissions.effectiveHint": "Alla som har behörigheten — direkt eller via en grupp (uppslaget av Keto).",
|
||||
"admin.permissions.field.name": "Behörighetens namn",
|
||||
"admin.permissions.field.nameHint": "Små bokstäver, siffror, bindestreck och understreck.",
|
||||
"admin.permissions.filter": "Filtrera behörigheter",
|
||||
"admin.permissions.new": "Ny behörighet",
|
||||
"admin.permissions.noEffective": "Ingen användare har den här behörigheten ännu.",
|
||||
"admin.permissions.noMembers": "Inte tilldelad till någon ännu.",
|
||||
"admin.permissions.pagination": "Sidnavigering för behörigheter",
|
||||
"admin.permissions.revoke": "Återkalla",
|
||||
|
||||
@@ -33,6 +33,6 @@
|
||||
</section>
|
||||
<section class="form-card admin-actions" aria-label="<%= t("admin.clients.title") %>">
|
||||
<p class="field-hint"><%= t("admin.clients.rereg") %></p>
|
||||
<a class="btn btn-danger" href="<%= del.action %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.clients.delete") %></a>
|
||||
<a class="btn btn-danger" href="<%= localeHref(del.action) %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.clients.delete") %></a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
<% } -%>
|
||||
</section>
|
||||
<section class="form-card admin-actions" aria-label="<%= t("admin.groups.actions") %>">
|
||||
<a class="btn btn-danger" href="<%= del.action %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.groups.delete") %></a>
|
||||
<a class="btn btn-danger" href="<%= localeHref(del.action) %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.groups.delete") %></a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<% } -%>
|
||||
</section>
|
||||
<section class="form-card" aria-labelledby="effective-h">
|
||||
<h2 class="card-title" id="effective-h">Effective access</h2>
|
||||
<p class="field-hint">Everyone who holds this permission — directly or through a group (resolved by Keto).</p>
|
||||
<h2 class="card-title" id="effective-h"><%= t("admin.permissions.effective") %></h2>
|
||||
<p class="field-hint"><%= t("admin.permissions.effectiveHint") %></p>
|
||||
<% if (effective.length) { -%>
|
||||
<ul class="plain-list">
|
||||
<% effective.forEach((u) => { -%>
|
||||
@@ -40,18 +40,18 @@
|
||||
<% }) -%>
|
||||
</ul>
|
||||
<% } else { -%>
|
||||
<p class="cell-muted">No users hold this permission yet.</p>
|
||||
<p class="cell-muted"><%= t("admin.permissions.noEffective") %></p>
|
||||
<% } -%>
|
||||
</section>
|
||||
<section class="form-card" aria-labelledby="add-h">
|
||||
<h2 class="card-title" id="add-h">Assign the permission</h2>
|
||||
<h2 class="card-title" id="add-h"><%= t("admin.permissions.assign") %></h2>
|
||||
<% if (add.options.length) { -%>
|
||||
<form class="inline-form" method="post" action="<%= add.action %>"><input type="hidden" name="_csrf" value="<%= csrf %>"><label class="sr-only" for="add-member">Member</label><span class="select"><select id="add-member" name="member" required><option value="" disabled selected>Choose a user or group…</option><% add.options.forEach((o) => { %><option value="<%= o.value %>"><%= o.label %></option><% }) %></select></span><button class="btn btn-primary" type="submit"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-plus"/></svg>Assign</button></form>
|
||||
<form class="inline-form" method="post" action="<%= add.action %>"><input type="hidden" name="_csrf" value="<%= csrf %>"><label class="sr-only" for="add-member"><%= t("admin.common.member") %></label><span class="select"><select id="add-member" name="member" required><option value="" disabled selected><%= t("admin.common.chooseMember") %></option><% add.options.forEach((o) => { %><option value="<%= o.value %>"><%= o.label %></option><% }) %></select></span><button class="btn btn-primary" type="submit"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-plus"/></svg><%= t("admin.permissions.assignAction") %></button></form>
|
||||
<% } else { -%>
|
||||
<p class="cell-muted">All users and groups already have this permission.</p>
|
||||
<p class="cell-muted"><%= t("admin.permissions.allAssigned") %></p>
|
||||
<% } -%>
|
||||
</section>
|
||||
<section class="form-card admin-actions" aria-label="Permission actions">
|
||||
<a class="btn btn-danger" href="<%= del.action %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg>Delete permission</a>
|
||||
<section class="form-card admin-actions" aria-label="<%= t("admin.permissions.actions") %>">
|
||||
<a class="btn btn-danger" href="<%= localeHref(del.action) %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.permissions.delete") %></a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<section class="form-card admin-actions" aria-label="<%= t("admin.users.actions") %>">
|
||||
<form method="post" action="<%= edit.recoveryAction %>"><input type="hidden" name="_csrf" value="<%= form.csrfToken %>"><button class="btn" type="submit"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-mail"/></svg><%= t("admin.users.recovery.generate") %></button></form>
|
||||
<form method="post" action="<%= edit.stateAction %>"><input type="hidden" name="_csrf" value="<%= form.csrfToken %>"><button class="btn" type="submit"><%= edit.nextLabel %></button></form>
|
||||
<a class="btn btn-danger" href="<%= edit.deleteAction %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.users.delete") %></a>
|
||||
<a class="btn btn-danger" href="<%= localeHref(edit.deleteAction) %>"><svg class="ico ico-sm" aria-hidden="true"><use href="#i-trash"/></svg><%= t("admin.users.delete") %></a>
|
||||
</section>
|
||||
<% } -%>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user