Commit b8c4efd2e9fff76ccf13ebde1daf585f5ba21824

Authored by AntonioTerceiro
1 parent bee6e16e

ActionItem68: s/virtual community/environment/

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@515 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/environment.rb
@@ -63,13 +63,13 @@ class Environment < ActiveRecord::Base @@ -63,13 +63,13 @@ class Environment < ActiveRecord::Base
63 end 63 end
64 end 64 end
65 65
66 - # the virtual community's terms of use: every user must accept them before 66 + # the environment's terms of use: every user must accept them before
67 # registering. 67 # registering.
68 def terms_of_use 68 def terms_of_use
69 self.settings['terms_of_use'] 69 self.settings['terms_of_use']
70 end 70 end
71 71
72 - # sets the virtual community's terms of use. 72 + # sets the environment's terms of use.
73 def terms_of_use=(value) 73 def terms_of_use=(value)
74 self.settings['terms_of_use'] = value 74 self.settings['terms_of_use'] = value
75 end 75 end
@@ -117,7 +117,7 @@ class Environment < ActiveRecord::Base @@ -117,7 +117,7 @@ class Environment < ActiveRecord::Base
117 # <tt>name</tt> is mandatory 117 # <tt>name</tt> is mandatory
118 validates_presence_of :name 118 validates_presence_of :name
119 119
120 - # only one virtual community can be the default one 120 + # only one environment can be the default one
121 validates_uniqueness_of :is_default, :if => (lambda do |environment| environment.is_default? end), :message => _('Only one Virtual Community can be the default one') 121 validates_uniqueness_of :is_default, :if => (lambda do |environment| environment.is_default? end), :message => _('Only one Virtual Community can be the default one')
122 122
123 # ################################################# 123 # #################################################
app/views/account/index.rhtml
@@ -23,5 +23,5 @@ @@ -23,5 +23,5 @@
23 23
24 <p> 24 <p>
25 <%= link_to _('Logout.'), :action => 'logout' %> 25 <%= link_to _('Logout.'), :action => 'logout' %>
26 -<%= _('It is always a good idea to make a logout when you finish using the virtual community.')%> 26 +<%= _('It is always a good idea to make a logout when you finish using the environment.')%>
27 </p> 27 </p>
app/views/account/index_anonymous.rhtml
@@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
2 2
3 <p> 3 <p>
4 <%= link_to _('Login.'), :action => 'login' %> 4 <%= link_to _('Login.'), :action => 'login' %>
5 -<%= _('You need to login to be able to use all the features in this virtual community.') %> 5 +<%= _('You need to login to be able to use all the features in this environment.') %>
6 </p> 6 </p>
7 7
8 <p> 8 <p>
9 <%= link_to _('Sign up.'), :action => 'signup' %> 9 <%= link_to _('Sign up.'), :action => 'signup' %>
10 -<%= _('If you are not an user already, you can register now to become a member of this virtual community.') %> 10 +<%= _('If you are not an user already, you can register now to become a member of this environment.') %>
11 </p> 11 </p>
app/views/admin_panel/index.rhtml
1 <h1><%= _('Administrator Panel') %></h1> 1 <h1><%= _('Administrator Panel') %></h1>
2 2
3 -<p><%= _('You, as an virtual community administrator, has the following options:')%></p> 3 +<p><%= _('You, as an environment administrator, has the following options:')%></p>
4 4
5 <ul> 5 <ul>
6 <li><%= link_to _('Enable/disable features'), :controller => 'features' %></li> 6 <li><%= link_to _('Enable/disable features'), :controller => 'features' %></li>
app/views/features/index.rhtml
@@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
2 2
3 <%= render :partial => 'features_table' %> 3 <%= render :partial => 'features_table' %>
4 4
5 -<%= help_textile _('Here you can enable or disable several features of your virtual community. Each feature represents some funcionality that your virtual community can use if you enable it. 5 +<%= help_textile _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.
6 6
7 -Check all the features you want to enable for your virtual community, uncheck all the ones you don\t want, and use the \'Save changes\' button to confirm your changes.') %> 7 +Check all the features you want to enable for your environment, uncheck all the ones you don\t want, and use the \'Save changes\' button to confirm your changes.') %>
config/routes.rb
@@ -32,14 +32,14 @@ ActionController::Routing::Routes.draw do |map| @@ -32,14 +32,14 @@ ActionController::Routing::Routes.draw do |map|
32 ###################################################### 32 ######################################################
33 ## Controllers that are used by environment admin 33 ## Controllers that are used by environment admin
34 ###################################################### 34 ######################################################
35 - # administrative tasks for a virtual community 35 + # administrative tasks for a environment
36 map.admin 'admin', :controller => 'admin_panel' 36 map.admin 'admin', :controller => 'admin_panel'
37 map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin') 37 map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin')
38 38
39 ###################################################### 39 ######################################################
40 ## Controllers that are used by system admin 40 ## Controllers that are used by system admin
41 ###################################################### 41 ######################################################
42 - # administrative tasks for a virtual community 42 + # administrative tasks for a environment
43 map.system 'system', :controller => 'system' 43 map.system 'system', :controller => 'system'
44 map.system 'system/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('system_admin') 44 map.system 'system/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('system_admin')
45 45
po/noosfero.pot
@@ -227,7 +227,7 @@ msgid &quot;PersonInfo|Contact information&quot; @@ -227,7 +227,7 @@ msgid &quot;PersonInfo|Contact information&quot;
227 msgstr "" 227 msgstr ""
228 228
229 #: app/models/environment.rb:- 229 #: app/models/environment.rb:-
230 -msgid "virtual community" 230 +msgid "environment"
231 msgstr "" 231 msgstr ""
232 232
233 #: app/models/environment.rb:- 233 #: app/models/environment.rb:-
@@ -979,7 +979,7 @@ msgid &quot;Administrator Panel&quot; @@ -979,7 +979,7 @@ msgid &quot;Administrator Panel&quot;
979 msgstr "" 979 msgstr ""
980 980
981 #: app/views/admin_panel/index.rhtml:3 981 #: app/views/admin_panel/index.rhtml:3
982 -msgid "You, as an virtual community administrator, has the following options:" 982 +msgid "You, as an environment administrator, has the following options:"
983 msgstr "" 983 msgstr ""
984 984
985 #: app/views/admin_panel/index.rhtml:6 985 #: app/views/admin_panel/index.rhtml:6
@@ -1023,7 +1023,7 @@ msgstr &quot;&quot; @@ -1023,7 +1023,7 @@ msgstr &quot;&quot;
1023 #: app/views/account/index_anonymous.rhtml:10 1023 #: app/views/account/index_anonymous.rhtml:10
1024 msgid "" 1024 msgid ""
1025 "If you are not an user already, you can register now to become a member of " 1025 "If you are not an user already, you can register now to become a member of "
1026 -"this virtual community." 1026 +"this environment."
1027 msgstr "" 1027 msgstr ""
1028 1028
1029 #: app/views/account/change_password.rhtml:1 1029 #: app/views/account/change_password.rhtml:1
@@ -1087,11 +1087,11 @@ msgstr &quot;&quot; @@ -1087,11 +1087,11 @@ msgstr &quot;&quot;
1087 1087
1088 #: app/views/features/index.rhtml:5 1088 #: app/views/features/index.rhtml:5
1089 msgid "" 1089 msgid ""
1090 -"Here you can enable or disable several features of your virtual community. "  
1091 -"Each feature represents some funcionality that your virtual community can " 1090 +"Here you can enable or disable several features of your environment. "
  1091 +"Each feature represents some funcionality that your environment can "
1092 "use if you enable it.\n" 1092 "use if you enable it.\n"
1093 "\n" 1093 "\n"
1094 -"Check all the features you want to enable for your virtual community, " 1094 +"Check all the features you want to enable for your environment, "
1095 "uncheck all the ones you don\t want, and use the 'Save changes' button to " 1095 "uncheck all the ones you don\t want, and use the 'Save changes' button to "
1096 "confirm your changes." 1096 "confirm your changes."
1097 msgstr "" 1097 msgstr ""
po/pt_BR/noosfero.po
@@ -229,7 +229,7 @@ msgid &quot;PersonInfo|Contact information&quot; @@ -229,7 +229,7 @@ msgid &quot;PersonInfo|Contact information&quot;
229 msgstr "Informação de contato" 229 msgstr "Informação de contato"
230 230
231 #: app/models/environment.rb:- 231 #: app/models/environment.rb:-
232 -msgid "virtual community" 232 +msgid "environment"
233 msgstr "comunidade virtual" 233 msgstr "comunidade virtual"
234 234
235 #: app/models/environment.rb:- 235 #: app/models/environment.rb:-
@@ -985,7 +985,7 @@ msgid &quot;Administrator Panel&quot; @@ -985,7 +985,7 @@ msgid &quot;Administrator Panel&quot;
985 msgstr "Painel do Administrador" 985 msgstr "Painel do Administrador"
986 986
987 #: app/views/admin_panel/index.rhtml:3 987 #: app/views/admin_panel/index.rhtml:3
988 -msgid "You, as an virtual community administrator, has the following options:" 988 +msgid "You, as an environment administrator, has the following options:"
989 msgstr "" 989 msgstr ""
990 "Você, como administrador de comunidade virtual, tem as seguintes opções:" 990 "Você, como administrador de comunidade virtual, tem as seguintes opções:"
991 991
@@ -1032,7 +1032,7 @@ msgstr &quot;Registre-se.&quot; @@ -1032,7 +1032,7 @@ msgstr &quot;Registre-se.&quot;
1032 #: app/views/account/index_anonymous.rhtml:10 1032 #: app/views/account/index_anonymous.rhtml:10
1033 msgid "" 1033 msgid ""
1034 "If you are not an user already, you can register now to become a member of " 1034 "If you are not an user already, you can register now to become a member of "
1035 -"this virtual community." 1035 +"this environment."
1036 msgstr "" 1036 msgstr ""
1037 "Se você ainda não é um usuário, você pode se registrar agora e se tornar um " 1037 "Se você ainda não é um usuário, você pode se registrar agora e se tornar um "
1038 "membro desse comunidade virtual." 1038 "membro desse comunidade virtual."
@@ -1100,11 +1100,11 @@ msgstr &quot;Habilitar/Desabilitar funcionalidades&quot; @@ -1100,11 +1100,11 @@ msgstr &quot;Habilitar/Desabilitar funcionalidades&quot;
1100 1100
1101 #: app/views/features/index.rhtml:5 1101 #: app/views/features/index.rhtml:5
1102 msgid "" 1102 msgid ""
1103 -"Here you can enable or disable several features of your virtual community. "  
1104 -"Each feature represents some funcionality that your virtual community can " 1103 +"Here you can enable or disable several features of your environment. "
  1104 +"Each feature represents some funcionality that your environment can "
1105 "use if you enable it.\n" 1105 "use if you enable it.\n"
1106 "\n" 1106 "\n"
1107 -"Check all the features you want to enable for your virtual community, " 1107 +"Check all the features you want to enable for your environment, "
1108 "uncheck all the ones you don\t want, and use the 'Save changes' button to " 1108 "uncheck all the ones you don\t want, and use the 'Save changes' button to "
1109 "confirm your changes." 1109 "confirm your changes."
1110 msgstr "" 1110 msgstr ""
test/fixtures/design_boxes.yml
1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 -# none: creating a virtual community alerady creates its boxes. Thanks to 2 +# none: creating a environment alerady creates its boxes. Thanks to
3 # acts_as_design 3 # acts_as_design
test/integration/routing_test.rb
@@ -34,7 +34,7 @@ class RoutingTest &lt; ActionController::IntegrationTest @@ -34,7 +34,7 @@ class RoutingTest &lt; ActionController::IntegrationTest
34 assert_routing('/myprofile/ze', :profile => 'ze', :controller => 'profile_editor', :action => 'index') 34 assert_routing('/myprofile/ze', :profile => 'ze', :controller => 'profile_editor', :action => 'index')
35 end 35 end
36 36
37 - # virtual community administrative controllers (admin/*) 37 + # environment administrative controllers (admin/*)
38 ################################################################ 38 ################################################################
39 39
40 def test_admin_panel_controller 40 def test_admin_panel_controller
test/unit/environment_test.rb
@@ -63,12 +63,12 @@ class EnvironmentTest &lt; Test::Unit::TestCase @@ -63,12 +63,12 @@ class EnvironmentTest &lt; Test::Unit::TestCase
63 end 63 end
64 64
65 def test_terms_of_use 65 def test_terms_of_use
66 - v = Environment.new(:name => 'My test virtual community') 66 + v = Environment.new(:name => 'My test environment')
67 assert_nil v.terms_of_use 67 assert_nil v.terms_of_use
68 - v.terms_of_use = 'To be part of this virtual community, you must accept the following terms: ...' 68 + v.terms_of_use = 'To be part of this environment, you must accept the following terms: ...'
69 assert v.save 69 assert v.save
70 id = v.id 70 id = v.id
71 - assert_equal 'To be part of this virtual community, you must accept the following terms: ...', Environment.find(id).terms_of_use 71 + assert_equal 'To be part of this environment, you must accept the following terms: ...', Environment.find(id).terms_of_use
72 end 72 end
73 73
74 def test_has_terms_of_use 74 def test_has_terms_of_use