]> git.openstreetmap.org Git - rails.git/blobdiff - lib/id.rb
Trace everywhere in potlatch too
[rails.git] / lib / id.rb
index 73219442243bbc62001e429b37331cc0b49b7609..3adfecf65b4792854dc65e2f33b7e67a8a600f78 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.map { |p| p.basename.to_s[/(.*).json/] && Regexp.last_match(1) }.compact)
 end