From: Andy Allan Date: Wed, 29 Mar 2023 15:43:58 +0000 (+0100) Subject: Rework geocoder titles to avoid raw html in translations X-Git-Tag: live~866^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/aebac722c2e4cbd47dbdc6fc274f17bde1c9f320?hp=4cfb632b5e7e32d8298a3be327fc37d3180b8a7e Rework geocoder titles to avoid raw html in translations --- diff --git a/app/views/geocoder/search.html.erb b/app/views/geocoder/search.html.erb index ceb099421..86048b0ad 100644 --- a/app/views/geocoder/search.html.erb +++ b/app/views/geocoder/search.html.erb @@ -3,7 +3,10 @@ <%= render "sidebar_header", :title => t("site.sidebar.search_results") %> <% @sources.each do |source| %> -

<%= t(".title.#{source}_html") %>

+

+ <%= t(".title.results_from_html", :results_link => link_to(t(".title.#{source}"), + t(".title.#{source}_url"))) %> +

">
diff --git a/config/locales/en.yml b/config/locales/en.yml index d64c11782..afc578b69 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -590,9 +590,13 @@ en: geocoder: search: title: - latlon_html: 'Results from Internal' - osm_nominatim_html: 'Results from OpenStreetMap Nominatim' - osm_nominatim_reverse_html: 'Results from OpenStreetMap Nominatim' + results_from_html: 'Results from %{results_link}' + latlon: Internal + latlon_url: https://openstreetmap.org/ + osm_nominatim: OpenStreetMap Nominatim + osm_nominatim_url: https://nominatim.openstreetmap.org/ + osm_nominatim_reverse: OpenStreetMap Nominatim + osm_nominatim_reverse_url: https://nominatim.openstreetmap.org/ search_osm_nominatim: prefix_format: "%{name}" prefix: