From 44286b46b1962c3bf1d1568faf0a7f38a2a634c2 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 30 Mar 2022 17:41:21 +0100 Subject: [PATCH] Use String#tr instead of String.split(foo).join(bar) --- lib/osm_community_index/local_chapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osm_community_index/local_chapter.rb b/lib/osm_community_index/local_chapter.rb index 3b56f58e8..6df3c1bc9 100644 --- a/lib/osm_community_index/local_chapter.rb +++ b/lib/osm_community_index/local_chapter.rb @@ -42,7 +42,7 @@ module OsmCommunityIndex locale = File.basename(file, ".yaml") community_index_yaml = YAML.safe_load(File.read(file))[locale] # rails wants en-GB but osm-community-index has en_GB - locale_rails = locale.split("_").join("-") + locale_rails = locale.tr("_", "-") data = {} raw_local_chapters.each do |chapter| -- 2.39.5