]> git.openstreetmap.org Git - rails.git/commitdiff
add route to pass locale
authorAdam Hoyle <atomoil@gmail.com>
Tue, 10 Aug 2021 09:13:24 +0000 (10:13 +0100)
committerAdam Hoyle <atomoil@gmail.com>
Tue, 10 Aug 2021 09:13:24 +0000 (10:13 +0100)
app/controllers/site_controller.rb
config/routes.rb

index 2eb084f913f0641b18a0b7505714eefcfbd1eb9d..73e4ef51d5ced1dca199062575554ac35308fa80 100644 (file)
@@ -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
 
index aff5126f8ff8c4948d62fbe51331ca1cdea735b0..1295772f1c4c75c48aa99d83921a748ae6302ba8 100644 (file)
@@ -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" }