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/edit.html.erb | 70 +++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'app/views/nodes/edit.html.erb') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 4d58e62c..1d07a21e 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -1,18 +1,18 @@

<%= title_for_node(@node) %>

- <%= button_to 'Unlock + Back', unlock_node_path(@node), method: :put, + <%= button_to t(".unlock_back"), unlock_node_path(@node), method: :put, form: { class: 'button_to state_changing' }, disabled: @node.autosave.present? %> <% if @node.autosave || (@node.draft && @node.head) %> <%= button_to revert_node_path(@node), method: :put, - form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %> + form: { data: { confirm: t(".confirm_discard") }, class: 'button_to destructive' } do %> <%= icon("trash", library: "tabler", "aria-hidden": true) %> - <%= @node.draft && !@node.autosave ? "Destroy Draft" : "Discard Autosave" %> + <%= @node.draft && !@node.autosave ? t(".destroy_draft") : t(".discard_autosave") %> <% end %> <% if pair = @node.available_layer_pairs.find { |p| p.include?(:autosave) } %> - <%= button_to 'What changed?', + <%= button_to t(".what_changed"), diff_node_revisions_path(@node), method: :get, params: { start_revision: pair.first, end_revision: pair.last }, @@ -20,9 +20,9 @@ <% end %> <% end %> - <%= submit_tag "Save Draft", form: dom_id(@node, :edit) %> - <%= submit_tag "Save + Unlock + Exit", form: dom_id(@node, :edit) %> - <%= link_to "Preview ↗", preview_page_path(@page), target: "_blank", rel: "noopener", class: "preview_link" %> + <%= submit_tag t(".save_draft"), form: dom_id(@node, :edit) %> + <%= submit_tag t(".save_unlock_exit"), form: dom_id(@node, :edit) %> + <%= link_to t(".preview"), preview_page_path(@page), target: "_blank", rel: "noopener", class: "preview_link" %>
@@ -37,13 +37,13 @@
-
Title
+
<%= t("admin.columns.title") %>
<%= d.text_field :title %>
-
Abstract
+
<%= t(".abstract") %>
<%= d.text_area :abstract %>
-
Attachments
+
<%= t(".attachments") %>
@@ -81,10 +81,10 @@
  • <%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %> - -
  • @@ -92,9 +92,9 @@
    - Metadata (slug, parent, tags, template, author, images) + <%= t(".metadata_summary") %>
    -
    Slug
    +
    <%= t(".slug") %>
    <%= f.text_field( :staged_slug, :value => @node.staged_slug || @node.slug @@ -102,10 +102,10 @@ %>
    -
    parent
    +
    <%= t(".parent") %>
    <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %> -

    Start typing to find a new parent for this node.

    +

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

    <%= f.hidden_field( :staged_parent_id, @@ -114,22 +114,22 @@ %>
    -
    Tags
    +
    <%= t(".tags") %>
    <%= text_field_tag :tag_list, @page.tag_list.join(', ') %> - Comma separated, lowercase. + <%= t(".tags_hint") %>
    -
    Publish at
    +
    <%= t(".publish_at") %>
    <%= d.datetime_select :published_at, :value => @page.published_at %>
    -
    Template
    +
    <%= t(".template") %>
    <%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %> - Set automatically based on how this node was created - change it if needed. + <%= t(".template_hint") %>
    -
    Author
    +
    <%= t(".author") %>
    <%= d.select :user_id, user_list, :selected => @page.user_id || @node.draft&.user_id || @node.head&.user_id %> @@ -139,13 +139,13 @@
    -
    Body
    +
    <%= t(".body") %>
    - -
    @@ -154,7 +154,7 @@
    <%= d.text_area :body, :class => 'with_editor' %>
    @@ -162,8 +162,8 @@ <% end %>
    - <%= f.submit 'Save Draft' %> - <%= f.submit 'Save + Unlock + Exit' %> + <%= f.submit t(".save_draft") %> + <%= f.submit t(".save_unlock_exit") %>
    <% end %> -- cgit v1.3