]> git.openstreetmap.org Git - rails.git/commitdiff
Move public editing content into its own partial
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 8 Feb 2023 14:01:41 +0000 (14:01 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 22 Feb 2023 09:16:17 +0000 (09:16 +0000)
This makes the editing page easier to read, and simplifies the i18n
in the public editing section.

app/views/accounts/_go_public.html.erb [new file with mode: 0644]
app/views/accounts/edit.html.erb
config/locales/en.yml

diff --git a/app/views/accounts/_go_public.html.erb b/app/views/accounts/_go_public.html.erb
new file mode 100644 (file)
index 0000000..af3667e
--- /dev/null
@@ -0,0 +1,14 @@
+<hr class="mb-3" />
+<a name="public"></a>
+<h2><%= t ".heading" %></h2>
+<p>
+  <%= t ".currently_not_public" %>
+  <strong><%= t ".only_public_can_edit" %></strong>
+  <%= t ".find_out_why_html", :link => link_to(t(".find_out_why"),
+                                               t(".find_out_why_url")) %>
+</p>
+<ul>
+  <li><%= t ".email_not_revealed" %></li>
+  <li><%= t ".not_reversible" %></li>
+</ul>
+<%= button_to t(".make_edits_public_button"), user_go_public_path, :class => "btn btn-primary" %>
index 2fae4640a531eba4fb716a16d8c20fcf0fc3b9d4..e783367dd1b9600812e670e12c752aef3cba5a59 100644 (file)
 <% end %>
 
 <% unless current_user.data_public? %>
-  <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" %>
+  <%= render :partial => "go_public" %>
 <% end %>
index 28509baa11f355dad4f58dc26038bf0aed5caf3d..7ed1eb10a5b7cd885abac9f8faef3c44c0e495d3 100644 (file)
@@ -273,15 +273,6 @@ en:
         enabled link text: "what is this?"
         disabled: "Disabled and cannot edit data, all previous edits are anonymous."
         disabled link text: "why can't I edit?"
-      public editing note:
-        heading: "Public editing"
-        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."
@@ -291,8 +282,17 @@ en:
         link: "https://wiki.osmfoundation.org/wiki/Licence/Contributor_Terms"
         link text: "what is this?"
       save changes button: Save Changes
-      make edits public button: Make all my edits public
       delete_account: Delete Account...
+    go_public:
+      heading: "Public editing"
+      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.
+      make_edits_public_button: Make all my edits public
     update:
       success_confirm_needed: "User information updated successfully. Check your email for a note to confirm your new email address."
       success: "User information updated successfully."