Commit 9205fad718dabae42c4e2596053d2ee2e435276d
1 parent
1c2bea77
Exists in
master
and in
29 other branches
Move definition of Noosfero.locales to lib/noosfero.rb
Showing
2 changed files
with
12 additions
and
11 deletions
Show diff stats
config/environment.rb
... | ... | @@ -111,16 +111,6 @@ end |
111 | 111 | |
112 | 112 | ActiveRecord::Base.store_full_sti_class = true |
113 | 113 | |
114 | -Noosfero.locales = { | |
115 | - 'en' => 'English', | |
116 | - 'pt' => 'Português', | |
117 | - 'fr' => 'Français', | |
118 | - 'hy' => 'հայերեն լեզու', | |
119 | - 'de' => 'Deutsch', | |
120 | - 'ru' => 'русский язык', | |
121 | - 'es' => 'Español', | |
122 | - 'eo' => 'Esperanto' | |
123 | -} | |
124 | 114 | # if you want to override this, do it in config/local.rb ! |
125 | 115 | Noosfero.default_locale = nil |
126 | 116 | ... | ... |
lib/noosfero.rb
... | ... | @@ -9,7 +9,18 @@ module Noosfero |
9 | 9 | end |
10 | 10 | |
11 | 11 | class << self |
12 | - attr_accessor :locales | |
12 | + def locales | |
13 | + { | |
14 | + 'en' => 'English', | |
15 | + 'pt' => 'Português', | |
16 | + 'fr' => 'Français', | |
17 | + 'hy' => 'հայերեն լեզու', | |
18 | + 'de' => 'Deutsch', | |
19 | + 'ru' => 'русский язык', | |
20 | + 'es' => 'Español', | |
21 | + 'eo' => 'Esperanto' | |
22 | + } | |
23 | + end | |
13 | 24 | attr_accessor :default_locale |
14 | 25 | def available_locales |
15 | 26 | @available_locales ||= | ... | ... |