[openstreetmap/openstreetmap-website] Add Communities page (#3301)
Andy Allan
notifications at github.com
Wed Aug 10 16:23:01 UTC 2022
@gravitystorm commented on this pull request.
> @@ -0,0 +1,26 @@
+module OsmCommunityIndex
+ def self.add_to_i18n
+ communities = Community.all
+ files = Dir.glob(Rails.root.join("node_modules/osm-community-index/i18n/*"))
+ files.each do |file|
+ locale = File.basename(file, ".yaml")
+ community_locale_yaml = YAML.safe_load(File.read(file))[locale]
+ # rails wants en-GB but osm-community-index has en_GB
+ locale_rails = locale.tr("_", "-")
+ data = {}
+
+ communities.each do |community|
That's much nicer - done.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r942659709
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3301/review/1068585638 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220810/c9d9122f/attachment.htm>
More information about the rails-dev
mailing list