[openstreetmap/openstreetmap-website] Add Communities page (#3301)

Adam Hoyle notifications at github.com
Wed Aug 25 21:11:55 UTC 2021


@atomoil commented on this pull request.



> @@ -106,6 +106,11 @@ def about
     @locale = params[:about_locale] || I18n.locale
   end
 
+  def communities
+    @locale = params[:communities_locale] || I18n.locale

This is the locale from an i18n point of view, it's used to provide appropriate localisation / translation of the Local Chapter names. 

This does neatly segue into wondering if I'm handling the i18n in a reasonable way. `osm-community-index` contains a set of localisations. We are only using a small subset of those for this piece of work. Ideally I would create a standalone instance of I18n and pass it the `osm-community-index` yamls, but I am new to Ruby on Rails and I couldn't see a way to do that, so as a first draft I've written a super basic internal implementation. Is there a better way to handle localisation, eg should it use the openstreetmap-website i18n (aka add the necessary keys - but then there is a maintenance task to add missing keys as/when `osm-community-index` adds them, which seems undesirable). All thoughts gratefully received.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r696116531
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210825/21959c69/attachment.htm>


More information about the rails-dev mailing list