Rework geocoder titles to avoid raw html in translations

This commit is contained in:
Andy Allan 2023-03-29 16:43:58 +01:00
parent 4cfb632b5e
commit aebac722c2
2 changed files with 11 additions and 4 deletions

View file

@ -3,7 +3,10 @@
<%= render "sidebar_header", :title => t("site.sidebar.search_results") %>
<% @sources.each do |source| %>
<h4><%= t(".title.#{source}_html") %></h4>
<h4>
<%= t(".title.results_from_html", :results_link => link_to(t(".title.#{source}"),
t(".title.#{source}_url"))) %>
</h4>
<div class="search_results_entry mx-n3" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>">
<div class="text-center loader">
<div class="spinner-border" role="status">

View file

@ -590,9 +590,13 @@ en:
geocoder:
search:
title:
latlon_html: 'Results from <a href="https://openstreetmap.org/">Internal</a>'
osm_nominatim_html: 'Results from <a href="https://nominatim.openstreetmap.org/">OpenStreetMap Nominatim</a>'
osm_nominatim_reverse_html: 'Results from <a href="https://nominatim.openstreetmap.org/">OpenStreetMap Nominatim</a>'
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: