summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-25 20:16:32 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-25 20:16:32 +0200
commitf8ce323663debb22890ad1ed29f385b8b832abc6 (patch)
treee872c2d8a6af8de6ad84ef285240f0c130b26bcc
parentfe104aa2c52f61cd8555fbc98c20501f50f4aae8 (diff)
Extract public-site strings to i18n
The public views were never part of the admin extraction and were broken in both directions: German visitors got "Featured", "Calendar" and "Tags", English visitors got "Suchergebnisse für Suchbegriff:". Also picks up the unlock-confirm message in link_helper, a straggler from the revisions/menu_items batch, and drops two raw() calls in the application layout in favour of link_to blocks.
-rw-r--r--app/helpers/link_helper.rb6
-rw-r--r--app/views/content/_featured_articles.html.erb2
-rw-r--r--app/views/content/_front_page_calendar.html.erb4
-rw-r--r--app/views/content/_tags.html.erb2
-rw-r--r--app/views/layouts/application.html.erb8
-rw-r--r--app/views/layouts/assets.html.erb17
-rw-r--r--app/views/layouts/pages.html.erb19
-rw-r--r--app/views/search/index.html.erb2
-rw-r--r--app/views/tags/show.html.erb2
-rw-r--r--config/locales/de.yml21
-rw-r--r--config/locales/en.yml22
11 files changed, 56 insertions, 49 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb
index 9b0b4e10..2121133e 100644
--- a/app/helpers/link_helper.rb
+++ b/app/helpers/link_helper.rb
@@ -39,9 +39,9 @@ module LinkHelper
39 end 39 end
40 40
41 def unlock_link 41 def unlock_link
42 message = "Are you sure you want to unlock?\n" \ 42 message = t("admin.common.unlock_confirm",
43 "Locked by #{@node.lock_owner.login}\n" \ 43 :login => @node.lock_owner.login,
44 "Last modified #{@page.updated_at.to_fs(:db)}" 44 :time => @page.updated_at.to_fs(:db))
45 button_to 'Unlock', unlock_node_path(@node), 45 button_to 'Unlock', unlock_node_path(@node),
46 method: :put, 46 method: :put,
47 form: { data: { confirm: message }, class: 'button_to state_changing' } 47 form: { data: { confirm: message }, class: 'button_to state_changing' }
diff --git a/app/views/content/_featured_articles.html.erb b/app/views/content/_featured_articles.html.erb
index 6717c51f..2dfc4967 100644
--- a/app/views/content/_featured_articles.html.erb
+++ b/app/views/content/_featured_articles.html.erb
@@ -1,5 +1,5 @@
1<div id="featured_articles"> 1<div id="featured_articles">
2 <h2>Featured</h2> 2 <h2><%= t(".title") %></h2>
3 3
4 <!-- %= link_to( 4 <!-- %= link_to(
5 image_tag( '34c3-tuwat.1e4e25c.png' ), 5 image_tag( '34c3-tuwat.1e4e25c.png' ),
diff --git a/app/views/content/_front_page_calendar.html.erb b/app/views/content/_front_page_calendar.html.erb
index e7f46ba5..dc4ba884 100644
--- a/app/views/content/_front_page_calendar.html.erb
+++ b/app/views/content/_front_page_calendar.html.erb
@@ -1,5 +1,5 @@
1<div id="frontpage_calendar"> 1<div id="frontpage_calendar">
2 <h2>Calendar</h2> 2 <h2><%= t(".title") %></h2>
3 <ul class="teasertext"> 3 <ul class="teasertext">
4 <% occurrences.each do |occurrence| %> 4 <% occurrences.each do |occurrence| %>
5 <li> 5 <li>
@@ -8,4 +8,4 @@
8 </li> 8 </li>
9 <% end %> 9 <% end %>
10 </ul> 10 </ul>
11</div> \ No newline at end of file 11</div>
diff --git a/app/views/content/_tags.html.erb b/app/views/content/_tags.html.erb
index f0e7210c..cf339b6f 100644
--- a/app/views/content/_tags.html.erb
+++ b/app/views/content/_tags.html.erb
@@ -1,6 +1,6 @@
1<% unless @page.nil? || @page.tags.empty? %> 1<% unless @page.nil? || @page.tags.empty? %>
2<div id="tags"> 2<div id="tags">
3 <h2>Tags</h2> 3 <h2><%= t(".title") %></h2>
4 <ul class="teasertext"> 4 <ul class="teasertext">
5 <% @page.tags.each do |tag| %> 5 <% @page.tags.each do |tag| %>
6 <li><%= link_to tag.name, tag_path(tag.name) %></li> 6 <li><%= link_to tag.name, tag_path(tag.name) %></li>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index f981fc11..f95ea889 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -37,7 +37,7 @@
37 <%= render :partial => "content/search" %> 37 <%= render :partial => "content/search" %>
38 </div> 38 </div>
39 <div id="light-mode-div"> 39 <div id="light-mode-div">
40 <input id="light-mode" type="checkbox" aria-label="Switch between dark and light mode" /><label for="light-mode"><span class="hide-me">lights</span></label> 40 <input id="light-mode" type="checkbox" aria-label="<%= t(".light_mode_aria") %>" /><label for="light-mode"><span class="hide-me"><%= t(".light_mode_label") %></span></label>
41 </div> 41 </div>
42 <div id="burger-div"> 42 <div id="burger-div">
43 <input type="checkbox" id="menu-toggle" class="menu-checkbox"> 43 <input type="checkbox" id="menu-toggle" class="menu-checkbox">
@@ -49,10 +49,10 @@
49 49
50 <% if current_user && @page.node %> 50 <% if current_user && @page.node %>
51 <div class="main_navigation"> 51 <div class="main_navigation">
52 <h2>Admin</h2> 52 <h2><%= t(".admin") %></h2>
53 <ul> 53 <ul>
54 <li><%= link_to raw('<span class="inactive admin_edit_link">⚙️ Overview</span>'), admin_path %></li> 54 <li><%= link_to admin_path do %><span class="inactive admin_edit_link">⚙️ <%= t(".overview") %></span><% end %></li>
55 <li><%= link_to raw('<span class="inactive admin_edit_link">✎ Edit</span>'), node_path(@page.node) %></li> 55 <li><%= link_to node_path(@page.node) do %><span class="inactive admin_edit_link">✎ <%= t(".edit") %></span><% end %></li>
56 </ul> 56 </ul>
57 </div> 57 </div>
58 <% end %> 58 <% end %>
diff --git a/app/views/layouts/assets.html.erb b/app/views/layouts/assets.html.erb
deleted file mode 100644
index 9d629c8d..00000000
--- a/app/views/layouts/assets.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <title>Assets: <%= controller.action_name %></title>
8 <%= stylesheet_link_tag 'scaffold' %>
9</head>
10<body>
11
12<p style="color: green"><%= flash[:notice] %></p>
13
14<%= yield %>
15
16</body>
17</html>
diff --git a/app/views/layouts/pages.html.erb b/app/views/layouts/pages.html.erb
deleted file mode 100644
index 70ceece9..00000000
--- a/app/views/layouts/pages.html.erb
+++ /dev/null
@@ -1,19 +0,0 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <meta name="viewport" content="width=device-width,initial-scale=1" />
8 <meta property="og:image" content="https://www.ccc.de/images/chaosknoten.svg" />
9 <title>Pages: <%= controller.action_name %></title>
10 <%= stylesheet_link_tag 'scaffold' %>
11</head>
12<body>
13
14<p style="color: green"><%= flash[:notice] %></p>
15
16<%= yield %>
17
18</body>
19</html>
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb
index 81ffb0dc..bb8f63b7 100644
--- a/app/views/search/index.html.erb
+++ b/app/views/search/index.html.erb
@@ -1,5 +1,5 @@
1<% if params[:search_term] %> 1<% if params[:search_term] %>
2 <h2>Suchergebnisse für Suchbegriff: <%=h params[:search_term] %></h2> 2 <h2><%= t(".results_for", :query => params[:search_term]) %></h2>
3<% end %> 3<% end %>
4 4
5<%= 5<%=
diff --git a/app/views/tags/show.html.erb b/app/views/tags/show.html.erb
index 3a235223..eddf9b88 100644
--- a/app/views/tags/show.html.erb
+++ b/app/views/tags/show.html.erb
@@ -1,7 +1,7 @@
1<h2><%= t(:show_tag_headline) %> »<%=h @tag %>«</h2> 1<h2><%= t(:show_tag_headline) %> »<%=h @tag %>«</h2>
2 2
3<p class="feed_link"> 3<p class="feed_link">
4 <%= link_to "Subscribe to updates tagged »#{@tag}«", 4 <%= link_to t(".subscribe", :tag => @tag),
5 rss_tag_url(:tag => @tag, :format => :xml), 5 rss_tag_url(:tag => @tag, :format => :xml),
6 :type => "application/atom+xml" %> 6 :type => "application/atom+xml" %>
7</p> 7</p>
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 0ffc6ecc..ae1149a4 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -118,6 +118,20 @@ de:
118 tags: 118 tags:
119 index: 119 index:
120 title: "Tags" 120 title: "Tags"
121 show:
122 subscribe: "Änderungen mit dem Tag »%{tag}« abonnieren"
123
124 content:
125 featured_articles:
126 title: "Ausgewählt"
127 front_page_calendar:
128 title: "Termine"
129 tags:
130 title: "Tags"
131
132 search:
133 index:
134 results_for: "Suchergebnisse für: %{query}"
121 135
122 node_actions: 136 node_actions:
123 heading: "Letzte Änderungen" 137 heading: "Letzte Änderungen"
@@ -245,6 +259,7 @@ de:
245 update: "Aktualisieren" 259 update: "Aktualisieren"
246 confirm_sure: "Wirklich?" 260 confirm_sure: "Wirklich?"
247 confirm_irreversible: "Das kann nicht rückgängig gemacht werden. Fortfahren?" 261 confirm_irreversible: "Das kann nicht rückgängig gemacht werden. Fortfahren?"
262 unlock_confirm: "Wirklich entsperren?\nGesperrt von %{login}\nZuletzt geändert %{time}"
248 toggle_preview: "Live-Vorschau umschalten" 263 toggle_preview: "Live-Vorschau umschalten"
249 force_render: "Vorschau neu rendern" 264 force_render: "Vorschau neu rendern"
250 "yes": "ja" 265 "yes": "ja"
@@ -630,6 +645,12 @@ de:
630 title: "Menüeintrag bearbeiten" 645 title: "Menüeintrag bearbeiten"
631 646
632 layouts: 647 layouts:
648 application:
649 light_mode_aria: "Zwischen dunklem und hellem Modus wechseln"
650 light_mode_label: "Licht"
651 admin: "Verwaltung"
652 overview: "Übersicht"
653 edit: "Bearbeiten"
633 flash: 654 flash:
634 go_to_status: "Zum Status" 655 go_to_status: "Zum Status"
635 stale_prefix: "Die %{lang}-Übersetzung ist womöglich veraltet —" 656 stale_prefix: "Die %{lang}-Übersetzung ist womöglich veraltet —"
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5f2f266a..50811b37 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -70,6 +70,21 @@ en:
70 tags: 70 tags:
71 index: 71 index:
72 title: "Tags" 72 title: "Tags"
73 show:
74 subscribe: "Subscribe to updates tagged »%{tag}«"
75
76 content:
77 featured_articles:
78 title: "Featured"
79 front_page_calendar:
80 title: "Calendar"
81 tags:
82 title: "Tags"
83
84 search:
85 index:
86 results_for: "Search results for: %{query}"
87
73 88
74 node_actions: 89 node_actions:
75 heading: "Action log" 90 heading: "Action log"
@@ -197,6 +212,7 @@ en:
197 update: "Update" 212 update: "Update"
198 confirm_sure: "Are you sure?" 213 confirm_sure: "Are you sure?"
199 confirm_irreversible: "This cannot be undone. Continue?" 214 confirm_irreversible: "This cannot be undone. Continue?"
215 unlock_confirm: "Are you sure you want to unlock?\nLocked by %{login}\nLast modified %{time}"
200 toggle_preview: "Toggle live preview" 216 toggle_preview: "Toggle live preview"
201 force_render: "Force preview render" 217 force_render: "Force preview render"
202 "yes": "yes" 218 "yes": "yes"
@@ -581,6 +597,12 @@ en:
581 default_marker: "default" 597 default_marker: "default"
582 598
583 layouts: 599 layouts:
600 application:
601 light_mode_aria: "Switch between dark and light mode"
602 light_mode_label: "lights"
603 admin: "Admin"
604 overview: "Overview"
605 edit: "Edit"
584 flash: 606 flash:
585 go_to_status: "Go to Status" 607 go_to_status: "Go to Status"
586 stale_prefix: "The %{lang} translation may be out of date —" 608 stale_prefix: "The %{lang} translation may be out of date —"