X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1779347849622ade2abf4926a2db867d69f72033..2d7e0a397a1b2dbed74f40439c1305b1b48a063e:/lib/id.rb?ds=sidebyside diff --git a/lib/id.rb b/lib/id.rb index 15b7f8367..dc6ae8d90 100644 --- a/lib/id.rb +++ b/lib/id.rb @@ -1,3 +1,3 @@ module ID - LOCALES = 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