From 88ebeaac7fcf140cbab489e841bf9c197f84c4ea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 14 Jul 2026 02:17:04 +0200 Subject: Make revisions locale aware --- app/views/page_translations/edit.html.erb | 2 ++ app/views/page_translations/index.html.erb | 19 ------------------- app/views/page_translations/show.html.erb | 2 ++ 3 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 app/views/page_translations/index.html.erb (limited to 'app/views/page_translations') diff --git a/app/views/page_translations/edit.html.erb b/app/views/page_translations/edit.html.erb index 89b594e8..981fb743 100644 --- a/app/views/page_translations/edit.html.erb +++ b/app/views/page_translations/edit.html.erb @@ -2,6 +2,8 @@ Editing the <%= @locale.to_s.upcase %> translation of <%= title_for_node(@node) %>. +

<%= link_to 'View revision history', node_revisions_path(@node, :locale => @locale) %>

+

Metadata such as images, tags, template, and author belong to the page as a whole, not to a single translation — change those from the diff --git a/app/views/page_translations/index.html.erb b/app/views/page_translations/index.html.erb deleted file mode 100644 index a8c4f5dc..00000000 --- a/app/views/page_translations/index.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -

Translations — <%= title_for_node(@node) %>

- -
-
- <% @translations.each do |t| %> -
- <%= t[:locale].to_s.upcase %> - <% if t[:exists] %> - <%= t[:title] %> — updated <%= t[:updated_at] %> - <% if t[:outdated] %>may be outdated<% end %> - <%= link_to 'Edit', edit_node_translation_path(@node, t[:locale]) %> - <% else %> - Not yet translated. - <%= link_to 'Add', edit_node_translation_path(@node, t[:locale]) %> - <% end %> -
- <% end %> -
-
diff --git a/app/views/page_translations/show.html.erb b/app/views/page_translations/show.html.erb index c5bd151f..60eb7cf7 100644 --- a/app/views/page_translations/show.html.erb +++ b/app/views/page_translations/show.html.erb @@ -1,5 +1,7 @@

Compare — <%= title_for_node(@node) %>

+

<%= link_to 'View revision history', node_revisions_path(@node, :locale => @locale) %>

+

<%= @locale.to_s.upcase %>

-- cgit v1.3