From: Mayank Tankhiwale Date: Sat, 23 Nov 2019 15:02:47 +0000 (+0530) Subject: Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website X-Git-Tag: live~2872^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/11cd1c9fc1417f5e6b52991897b29bb94a4288a4?hp=7c89e7c0b418c5c4d9692b5e153946571a6ea994 Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 57ac07501..f57bb7c25 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -108,7 +108,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..cf596cf59 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 d936072d7..6764335d6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -146,6 +146,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 }