X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9e1dfe35c7aedb82897dfd21c446b67e159a13ba..036ef0add012aa3f329ee63e4894d59396670dc8:/lib/osm_community_index.rb?ds=sidebyside diff --git a/lib/osm_community_index.rb b/lib/osm_community_index.rb index 7ce379d0f..a5c2fba72 100644 --- a/lib/osm_community_index.rb +++ b/lib/osm_community_index.rb @@ -6,7 +6,7 @@ module OsmCommunityIndex files = Rails.root.glob("node_modules/osm-community-index/i18n/*.yaml") files.each do |file| locale = File.basename(file, ".yaml") - community_locale_yaml = YAML.safe_load(File.read(file))[locale] + community_locale_yaml = YAML.safe_load_file(file)[locale] # rails wants language-COUNTRY but osm-community-index uses underscores locale_rails = locale.tr("_", "-")