X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..2d136a979b66910a10dbea9838a33d83e79e1edb:/lib/id.rb?ds=sidebyside diff --git a/lib/id.rb b/lib/id.rb index 15f918e79..4e6cf3b7c 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.map { |p| p.basename.to_s[/(.*).json/] && Regexp.last_match(1) }.compact) end