Commit a7111e0332ca807176110830aa913b16d2475a06
1 parent
4fc10504
Exists in
master
and in
22 other branches
ActionItem862: restricting locales do those declared in Noosfero.locales
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero.rb
@@ -13,7 +13,7 @@ module Noosfero | @@ -13,7 +13,7 @@ module Noosfero | ||
13 | attr_accessor :locales | 13 | attr_accessor :locales |
14 | attr_accessor :default_locale | 14 | attr_accessor :default_locale |
15 | def available_locales | 15 | def available_locales |
16 | - Dir.glob(File.join(RAILS_ROOT, 'locale', '*')).map { |f| File.basename(f) } | 16 | + Dir.glob(File.join(RAILS_ROOT, 'locale', '*')).map { |f| File.basename(f) }.select {|item| locales.include?(item) } |
17 | end | 17 | end |
18 | end | 18 | end |
19 | 19 |