X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/16f5a5ac0c674b258996fcbde1c3fda2e651906a..c985c2d4ce1e239b8154cf8583d74598ffcd3161:/lib/id.rb diff --git a/lib/id.rb b/lib/id.rb index 858bc53c3..4e6cf3b7c 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.map { |p| p.basename.to_s[/(.*).json/] && Regexp.last_match(1) }.compact) end