Commit a164bdc0cd8fc1d953807a0d42f05d8435bf77bf

Authored by AntonioTerceiro
1 parent 7a0cc205

ActionItem523: calling "Communities" as "Groups"

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2304 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/public/search_controller.rb
... ... @@ -167,13 +167,13 @@ class SearchController < ApplicationController
167 167 where_to_search.select { |key,description| @searching[key] }.each do |key, description|
168 168 @order << key
169 169 @results[key] = @finder.find(key, @filtered_query, calculate_find_options(key, limit, params[:page], @product_category, @region, params[:radius], params[:year], params[:month]))
170   - @names[key] = gettext(description)
  170 + @names[key] = getterm(description)
171 171 end
172 172  
173 173 if @results.keys.size == 1
174 174 specific_action = @results.keys.first
175 175 if respond_to?(specific_action)
176   - @asset_name = gettext(@names[@results.keys.first])
  176 + @asset_name = getterm(@names[@results.keys.first])
177 177 send(specific_action)
178 178 render :action => specific_action
179 179 return
... ...
app/helpers/assets_helper.rb
... ... @@ -8,7 +8,7 @@ module AssetsHelper
8 8 [ options.merge(:asset => 'people'), "icon-menu-people", _('People') ],
9 9 [ options.merge(:asset => 'products'), "icon-menu-product", _('Products') ],
10 10 [ options.merge(:asset => 'enterprises'), "icon-menu-enterprise", _('Enterprises') ],
11   - [ options.merge(:asset => 'communities'), "icon-menu-community", _('Communities') ],
  11 + [ options.merge(:asset => 'communities'), "icon-menu-community", __('Communities') ],
12 12 [ options.merge(:asset => 'events'), "icon-menu-events", _('Events') ],
13 13  
14 14 ].select do |target, css_class, name|
... ...
app/models/communities_block.rb
1 1 class CommunitiesBlock < ProfileListBlock
2 2  
3 3 def self.description
4   - _('A block that displays your communities')
  4 + __('A block that displays your communities')
5 5 end
6 6  
7 7 def default_title
8   - _('Communities')
  8 + __('Communities')
9 9 end
10 10  
11 11 def help
12   - _('The communities in which the user is a member')
  12 + __('The communities in which the user is a member')
13 13 end
14 14  
15 15 def footer
... ... @@ -17,11 +17,11 @@ class CommunitiesBlock &lt; ProfileListBlock
17 17 case owner
18 18 when Profile
19 19 lambda do
20   - link_to _('All communities'), :profile => owner.identifier, :controller => 'profile', :action => 'communities'
  20 + link_to __('All communities'), :profile => owner.identifier, :controller => 'profile', :action => 'communities'
21 21 end
22 22 when Environment
23 23 lambda do
24   - link_to _('All communities'), :controller => 'search', :action => 'assets', :asset => 'communities'
  24 + link_to __('All communities'), :controller => 'search', :action => 'assets', :asset => 'communities'
25 25 end
26 26 else
27 27 ''
... ...
app/views/memberships/index.rhtml
... ... @@ -11,7 +11,7 @@
11 11 <span class='profile-details'>
12 12 <strong><%= membership.display_name %></strong><br/>
13 13 <%= _('Role: %s') % rolename_for(profile, membership) %> <br/>
14   - <%= _('Type: %s') % _(membership.class.name) %> <br/>
  14 + <%= _('Type: %s') % getterm(membership.class.name) %> <br/>
15 15 <%= _('Description: %s') % membership.description + '<br/>' if membership.community? %>
16 16 <%= _('Members: %s') % membership.members.size.to_s %> <br/>
17 17 <%= _('Created at: %s') % show_date(membership.created_at) %> <br/>
... ...
app/views/profile/index.rhtml
... ... @@ -19,7 +19,7 @@
19 19 <%# FIXME %>
20 20 <% if profile.kind_of? Person %>
21 21 <li><%= link_to _('Friends'), :action => 'friends' %></li>
22   - <li><%= link_to _('Communities'), :action => 'communities' %></li>
  22 + <li><%= link_to __('Communities'), :action => 'communities' %></li>
23 23 <li><%= link_to _('Enterprises'), :action => 'enterprises' %></li>
24 24 <% end %>
25 25 <% if profile.kind_of? Organization %>
... ...
lib/noosfero/core_ext/object.rb
... ... @@ -2,4 +2,5 @@ class Object
2 2 def __(*args)
3 3 gettext(Noosfero.term(*args))
4 4 end
  5 + alias :getterm :__
5 6 end
... ...
lib/zen3_terminology.rb
... ... @@ -7,7 +7,12 @@ class Zen3Terminology &lt; Noosfero::Terminology::Custom
7 7 # NOTE: the hash values must be marked for translation!!
8 8 super({
9 9 'My Home Page' => N_('My ePortfolio'),
10   - 'Homepage' => N_('ePortfolio')
  10 + 'Homepage' => N_('ePortfolio'),
  11 + 'Communities' => N_('Groups'),
  12 + 'A block that displays your communities' => N_('A block that displays your groups'),
  13 + 'The communities in which the user is a member' => N_('The groups in which the user is a member'),
  14 + 'All communities' => N_('All groups'),
  15 + 'Community' => N_('Group'),
11 16 })
12 17 end
13 18  
... ...