From 26aecfb2bf75c68ab7e396011662bf6c55057f77 Mon Sep 17 00:00:00 2001 From: Adam Hoyle Date: Tue, 10 Aug 2021 10:13:24 +0100 Subject: [PATCH] add route to pass locale --- app/controllers/site_controller.rb | 2 +- config/routes.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 2eb084f91..73e4ef51d 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -107,7 +107,7 @@ class SiteController < ApplicationController end def communities - @locale = I18n.locale + @locale = params[:communities_locale] || I18n.locale @local_chapters = Communities.local_chapters end diff --git a/config/routes.rb b/config/routes.rb index aff5126f8..1295772f1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -148,6 +148,7 @@ OpenStreetMap::Application.routes.draw do get "/about/:about_locale" => "site#about" get "/about" => "site#about" get "/communities" => "site#communities" + get "/communities/:communities_locale" => "site#communities" get "/history" => "changesets#index" get "/history/feed" => "changesets#feed", :defaults => { :format => :atom } get "/history/comments/feed" => "changeset_comments#index", :as => :changesets_comments_feed, :defaults => { :format => "rss" } -- 2.45.1