X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4028f4cdb91f616bc774dc9b9fa8c7183eb1f6dd..aba5048f454b2428fabc9168c2fe82f4419e1f23:/lib/id.rb diff --git a/lib/id.rb b/lib/id.rb index 858bc53c3..dc6ae8d90 100644 --- a/lib/id.rb +++ b/lib/id.rb @@ -1,3 +1,3 @@ module ID - LOCALES = Locale.list(Rails.root.join("vendor/assets/iD/iD/locales").entries.map { |p| p.basename.to_s[/(.*).json/] && $1 }.compact) + LOCALES = Locale.list(Rails.root.join("vendor/assets/iD/iD/locales").entries.filter_map { |p| p.basename.to_s[/(.*)\.min\.json/] && Regexp.last_match(1) }) end