]> git.openstreetmap.org Git - rails.git/commitdiff
Refactor public editing note to avoid raw html in the translations
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 8 Feb 2023 13:55:33 +0000 (13:55 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 22 Feb 2023 09:16:17 +0000 (09:16 +0000)
app/views/accounts/edit.html.erb
config/locales/en.yml

index 7aad944d364d9b79fbbe1cfc5dc804ea0fb79d28..2fae4640a531eba4fb716a16d8c20fcf0fc3b9d4 100644 (file)
 <% end %>
 
 <% unless current_user.data_public? %>
-<a name="public"></a>
-<h2><%= t ".public editing note.heading" %></h2>
-<%= t ".public editing note.html" %>
-<%= button_to t(".make edits public button"), user_go_public_path, :class => "btn btn-primary" %>
+  <hr class="mb-3" />
+  <a name="public"></a>
+  <h2><%= t ".public editing note.heading" %></h2>
+  <p>
+    <%= t ".public editing note.currently_not_public" %>
+    <strong><%= t ".public editing note.only_public_can_edit" %></strong>
+    <%= t ".public editing note.find_out_why_html", :link => link_to(t(".public editing note.find_out_why"),
+                                                                     t(".public editing note.find_out_why_url")) %>
+  </p>
+  <ul>
+    <li><%= t ".public editing note.email_not_revealed" %></li>
+    <li><%= t ".public editing note.not_reversible" %></li>
+  </ul>
+  <%= button_to t(".make edits public button"), user_go_public_path, :class => "btn btn-primary" %>
 <% end %>
index 40eb533a2db2b44ba7b3b24254749c2083ea8917..28509baa11f355dad4f58dc26038bf0aed5caf3d 100644 (file)
@@ -275,7 +275,13 @@ en:
         disabled link text: "why can't I edit?"
       public editing note:
         heading: "Public editing"
-        html: "Currently your edits are anonymous and people cannot send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below. <b>Since the 0.6 API changeover, only public users can edit map data</b>. (<a href=\"https://wiki.openstreetmap.org/wiki/Anonymous_edits\">find out why</a>).<ul><li>Your email address will not be revealed by becoming public.</li><li>This action cannot be reversed and all new users are now public by default.</li></ul>"
+        currently_not_public: "Currently your edits are anonymous and people cannot send you messages or see your location. To show what you edited and allow people to contact you through the website, click the button below."
+        only_public_can_edit: Since the 0.6 API changeover, only public users can edit map data.
+        find_out_why_html: (%{link}).
+        find_out_why: "find out why"
+        find_out_why_url: https://wiki.openstreetmap.org/wiki/Anonymous_edits
+        email_not_revealed: Your email address will not be revealed by becoming public.
+        not_reversible: This action cannot be reversed and all new users are now public by default.
       contributor terms:
         heading: "Contributor Terms"
         agreed: "You have agreed to the new Contributor Terms."