From 0a5d7806700bb3154529b99abc75d37ccc46faff Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 25 Jul 2026 02:23:13 +0200 Subject: Extract admin strings to i18n: the nodes cluster --- app/views/nodes/trashed.html.erb | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'app/views/nodes/trashed.html.erb') diff --git a/app/views/nodes/trashed.html.erb b/app/views/nodes/trashed.html.erb index 9a4808e6..a3c2cf41 100644 --- a/app/views/nodes/trashed.html.erb +++ b/app/views/nodes/trashed.html.erb @@ -1,42 +1,40 @@ -

Trash

+

<%= t(".title") %>

<% if @nodes.empty? %> -

The Trash is empty.

+

<%= t(".empty") %>

<% else %> <%= will_paginate @nodes %> - - - - + + + + <% @nodes.each do |node| %> <% entry = node.last_trash_entry %> <% doomed_below = node.descendants.count %> <% end %>
TitleWas atTrashedActions<%= t("admin.columns.title") %><%= t(".was_at") %><%= t(".trashed") %><%= t("admin.columns.actions") %>
- <%= link_to (node.draft&.title || node.slug), node_path(node) %><%= " (+ #{doomed_below} beneath)" if doomed_below > 0 %> + <%= link_to (node.draft&.title || node.slug), node_path(node) %><%= " " + t(".beneath", :count => doomed_below) if doomed_below > 0 %> <%= entry&.metadata&.dig("path", "from") %> <% if entry %> - <%= entry.occurred_at.strftime("%Y-%m-%d %H:%M") %> by <%= entry.actor_name %> + <%= t(".trashed_by", :time => entry.occurred_at.strftime("%Y-%m-%d %H:%M"), :actor => entry.actor_name) %> <% end %> <%= button_to node_path(node), method: :delete, - form: { data: { confirm: doomed_below > 0 ? - "Delete \"#{node.draft&.title || node.slug}\" and the #{doomed_below} pages beneath it permanently? This cannot be undone." : - "Delete \"#{node.draft&.title || node.slug}\" permanently? This cannot be undone." }, + form: { data: { confirm: t(".confirm_delete", :title => (node.draft&.title || node.slug), :count => doomed_below) }, class: 'button_to destructive' } do %> <%= icon("trash-x", library: "tabler", "aria-hidden": true) %> - Delete permanently + <%= t(".delete_permanently") %> <% end %>
<%= will_paginate @nodes %> -

To restore a page, open it and pick a new parent in its Trash section.

+

<%= t(".restore_hint") %>

<% end %> -- cgit v1.3