]> git.openstreetmap.org Git - rails.git/blobdiff - lib/osm_community_index.rb
Filter out the communities before loading the translations
[rails.git] / lib / osm_community_index.rb
index eb7948514369eff689f3d90bd2bc3f2a7fa863b7..fb3d7b28ed656be537ec44303d0fda3b566ad234 100644 (file)
@@ -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")