From: Tom Hughes Date: Mon, 30 Dec 2019 22:34:24 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/2444' X-Git-Tag: live~3394 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/3426976606d30278fcf5ed279d3c95900785c4a5?hp=29aac6e14964d612ee6a06998ae61bc8923f5946 Merge remote-tracking branch 'upstream/pull/2444' --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 3a69eed12..1fc916e7f 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -112,7 +112,9 @@ class SiteController < ApplicationController def help; end - def about; end + def about + @locale = params[:about_locale] || I18n.locale + end def export; end diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index 886aaf006..27bcbb9da 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -1,41 +1,41 @@
- <%= t ".copyright_html" %> + <%= t ".copyright_html", :locale => @locale %>
-

<%= raw t ".used_by", :name => "OpenStreetMap" %>

+

<%= raw t ".used_by", :name => "OpenStreetMap", :locale => @locale %>

-

<%= t ".lede_text" %>

-

<%= t ".local_knowledge_title" %>

-

<%= t ".local_knowledge_html" %>

+

<%= t ".lede_text", :locale => @locale %>

+

<%= t ".local_knowledge_title", :locale => @locale %>

+

<%= t ".local_knowledge_html", :locale => @locale %>

-

<%= t ".community_driven_title" %>

-

<%= t ".community_driven_html", :diary_path => diary_entries_path %>

+

<%= t ".community_driven_title", :locale => @locale %>

+

<%= t ".community_driven_html", :locale => @locale, :diary_path => diary_entries_path %>

-

<%= t ".open_data_title" %>

-

<%= t ".open_data_html", :copyright_path => copyright_path %>

+

<%= t ".open_data_title", :locale => @locale %>

+

<%= t ".open_data_html", :locale => @locale, :copyright_path => copyright_path %>

-

<%= t ".partners_title" %>

-

<%= t "layouts.hosting_partners_html", - :ucl => link_to(t("layouts.partners_ucl"), "https://www.ucl.ac.uk"), - :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"), - :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %> +

<%= t ".partners_title", :locale => @locale %>

+

<%= t "layouts.hosting_partners_html", :locale => @locale, + :ucl => link_to(t("layouts.partners_ucl", :locale => @locale), "https://www.ucl.ac.uk"), + :bytemark => link_to(t("layouts.partners_bytemark", :locale => @locale), "https://www.bytemark.co.uk"), + :partners => link_to(t("layouts.partners_partners", :locale => @locale), "https://hardware.openstreetmap.org/thanks/") %>

diff --git a/config/routes.rb b/config/routes.rb index 992197814..37ffa2d9a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -145,6 +145,7 @@ OpenStreetMap::Application.routes.draw do get "/welcome" => "site#welcome" get "/fixthemap" => "site#fixthemap" get "/help" => "site#help" + get "/about/:about_locale" => "site#about" get "/about" => "site#about" get "/history" => "changesets#index" get "/history/feed" => "changesets#feed", :defaults => { :format => :atom }