From: Tom Hughes <tom@compton.nu>
Date: Mon, 9 Aug 2021 17:29:54 +0000 (+0100)
Subject: Use correct link for users with no location
X-Git-Tag: live~2563
X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/26698d6?ds=sidebyside

Use correct link for users with no location

Fixes #3290
---

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index ac6938af7..1dd84edea 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -191,7 +191,7 @@
     <div class="col-md order-md-last">
       <% if @user.home_lat.nil? or @user.home_lon.nil? %>
         <div id="map" class="content_map">
-          <p id="no_home_location"><%= t(".if_set_location_html", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %></p>
+          <p id="no_home_location"><%= t(".set_location_html", :edit_profile_url => edit_profile_path) %></p>
         </div>
       <% else %>
         <% content_for :head do %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7dce96dd6..1b411a229 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2505,8 +2505,7 @@ en:
       spam score: "Spam Score:"
       description: Description
       user location: User location
-      if_set_location_html: "Set your home location on the %{settings_link} page to see nearby users."
-      settings_link_text: settings
+      set_location_html: "<a href=\"%{edit_profile_url}\">Edit your profile</a> and set your home location to see nearby users."
       my friends: My friends
       no friends: You have not added any friends yet.
       km away: "%{count}km away"