From b14ac16672c96e5b764fbc2a9c36a40307347ed8 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Thu, 27 Nov 2025 18:11:57 +0000 Subject: [PATCH] Allow meta description and search title to be translated Fixes #6527 This uses the same description as the default "og:description" for the site, to reduce the number of translations. Of the two alternative previous descriptions, the one in "og:description" more closely matches the language used on the about page, so let's go with that. --- app/views/layouts/_meta.html.erb | 4 ++-- config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_meta.html.erb b/app/views/layouts/_meta.html.erb index 48be6e0aa..2002045e6 100644 --- a/app/views/layouts/_meta.html.erb +++ b/app/views/layouts/_meta.html.erb @@ -20,8 +20,8 @@ <% if Settings.key?(:publisher_url) -%> <%= tag.link :rel => "publisher", :href => Settings.publisher_url %> <% end -%> -<%= tag.link :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") %> -<%= tag.meta :name => "description", :content => "OpenStreetMap is the free wiki world map." %> +<%= tag.link :rel => "search", :type => "application/opensearchdescription+xml", :title => t(".openstreetmap_search"), :href => asset_path("osm.xml") %> +<%= tag.meta :name => "description", :content => t("layouts.intro_text") %> <%= opengraph_tags(@title, @opengraph_properties || {}) %> <% if flash[:matomo_goal] -%> <%= tag.meta :name => "matomo-goal", :content => flash[:matomo_goal] %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 4a822f315..7070bcf58 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1874,6 +1874,8 @@ en: header: select_language: Select Language loading: Loading... + meta: + openstreetmap_search: OpenStreetMap Search select_language_button: title: Select Language offline_flash: -- 2.39.5