From fe104aa2c52f61cd8555fbc98c20501f50f4aae8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 25 Jul 2026 17:45:34 +0200 Subject: Extract admin strings to i18n: revisions, page_translations, and menu items, --- app/views/revisions/index.html.erb | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'app/views/revisions/index.html.erb') diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index 7ea74a6c..6bcf1820 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb @@ -1,12 +1,12 @@ -

Revisions for Node: <%= @node.unique_name %>

+

<%= t(".title", :path => @node.unique_name) %>

- <%= link_to 'Back to node', node_path(@node) %> + <%= link_to t(".back_to_node"), node_path(@node) %>

<% if Page.non_default_locales.any? %>

- Locale: + <%= t("revisions.locale_label") %> <% ([I18n.default_locale] + Page.non_default_locales).each_with_index do |locale, i| %> <%= " · ".html_safe if i > 0 %> <% if locale == @locale %> @@ -21,25 +21,25 @@ - - - - - - + + + + + + @@ -53,11 +53,11 @@ - + <% end %> @@ -73,9 +73,9 @@ var label = document.getElementById('diff_selection_label'); if (start && end) { - label.textContent = start.value + ' against ' + end.value; + label.textContent = start.value + ' ' + label.dataset.against + ' ' + end.value; } else if (start || end) { - label.textContent = (start || end).value + ' selected'; + label.textContent = (start || end).value + ' ' + label.dataset.selected; } else { label.textContent = ''; } -- cgit v1.3
FirstLastRev.TitleEditorDate<%= t(".first") %><%= t(".last") %><%= t("admin.columns.rev") %><%= t("admin.columns.title") %><%= t("admin.columns.editor") %><%= t("admin.columns.date") %>
- <%= button_to 'Diff revisions', diff_node_revisions_path(@node), + <%= button_to t(".diff_revisions"), diff_node_revisions_path(@node), method: :post, params: { locale: @locale }, form: { id: 'diff_form', class: 'button_to computation' }, disabled: true %> - - - + " data-selected="<%= t(".selected_word") %>"> + +
<%= page.translations.find_by(:locale => @locale)&.title || "—" %> <%= page.editor.try(:login) %> <%= page.updated_at %><%= link_to 'show', node_revision_path(@node, page, :locale => @locale) %><%= link_to t(".show_link"), node_revision_path(@node, page, :locale => @locale) %> - <%= button_to 'restore', restore_node_revision_path(@node, page), + <%= button_to t(".restore_link"), restore_node_revision_path(@node, page), method: :put, - form: { data: { confirm: "Restore this revision?" }, class: 'button_to state_changing' } %> + form: { data: { confirm: t(".confirm_restore") }, class: 'button_to state_changing' } %>