]> git.openstreetmap.org Git - rails.git/blobdiff - lib/id.rb
Match the width of the overlay-sidebar on narrow screens to the width on full-sized...
[rails.git] / lib / id.rb
index 15f918e799b9a15d16e31fe4ddefee2e1ed73c4b..87c4a194e9ff5d4b1889aa4d583e1383a00af122 100644 (file)
--- 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[/(.*).json/] && Regexp.last_match(1) })
 end