X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/bf1f882eb8c91f8cc9ab98aa3d2c62d63016a295..7e62e2b5edb8100ff4b29cf34abfb8a9316c9996:/lib/osm_community_index.rb diff --git a/lib/osm_community_index.rb b/lib/osm_community_index.rb index eb7948514..fb3d7b28e 100644 --- a/lib/osm_community_index.rb +++ b/lib/osm_community_index.rb @@ -1,6 +1,8 @@ module OsmCommunityIndex def self.add_to_i18n - communities = Community.all + # Filter the communities here to avoid loading excessive numbers of translations + communities = Community.where(:type => "osm-lc").where.not(:id => "OSMF") + files = Dir.glob(Rails.root.join("node_modules/osm-community-index/i18n/*.yaml")) files.each do |file| locale = File.basename(file, ".yaml")