Commit 5efb29a17453b7d7f589492bfb5b8cb400faa1fd

Authored by Tallys Martins
Committed by Daniela Feitosa
1 parent e870895f

organization ratings: fix strings for translations

Signed-off-by: Daniela Soares Feitosa <danielafeitosa@colivre.coop.br>
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb
... ... @@ -12,7 +12,7 @@ class OrganizationRatingsPluginProfileController &lt; ProfileController
12 12 if @rating_available
13 13 create_new_rate
14 14 else
15   - session[:notice] = _("You can not vote on this %s") % profile.class.name
  15 + session[:notice] = _("You can not vote on this %s") % _(profile.class.name)
16 16 end
17 17 end
18 18 end
... ...
plugins/organization_ratings/lib/create_organization_rating_comment.rb
... ... @@ -63,7 +63,7 @@ class CreateOrganizationRatingComment &lt; Task
63 63  
64 64 def information
65 65 message = _("<a href=%{requestor_url}>%{requestor}</a> wants to create a comment in this %{target_class}") %
66   - {:requestor_url => url_for(self.requestor.url), :requestor => self.requestor.name, :target_class => self.target.class.name.downcase}
  66 + {:requestor_url => url_for(self.requestor.url), :requestor => self.requestor.name, :target_class => _(self.target.class.name)}
67 67  
68 68 {:message => message}
69 69 end
... ... @@ -88,20 +88,20 @@ class CreateOrganizationRatingComment &lt; Task
88 88  
89 89 def target_notification_description
90 90 _("%{requestor} wants to create a comment in this \"%{target}\"") %
91   - {:requestor => self.requestor.name, :target => self.target.class.name.downcase }
  91 + {:requestor => self.requestor.name, :target => _(self.target.class.name.downcase) }
92 92 end
93 93  
94 94 def target_notification_message
95   - _("User \"%{user}\" just requested to create a comment in the %{target_class}
  95 + _("User \"%{user}\" requested to create a comment in the %{target_class}
96 96 \"%{target_name}\".
97 97 You have to approve or reject it through the \"Pending Validations\"
98 98 section in your control panel.\n") %
99   - { :user => self.requestor.name, :target_class => self.target.class.name.downcase, :target_name => self.target.name }
  99 + { :user => self.requestor.name, :target_class => _(self.target.class.name.downcase), :target_name => self.target.name }
100 100 end
101 101  
102 102 def task_created_message
103 103 _("Your request for commenting at %{target} was
104   - just sent. Environment administrator will receive it and will approve or
  104 + just sent. The administrator will receive it and will approve or
105 105 reject your request according to his methods and criteria.
106 106 You will be notified as soon as environment administrator has a position
107 107 about your request.") %
... ... @@ -110,16 +110,16 @@ class CreateOrganizationRatingComment &lt; Task
110 110  
111 111 def task_cancelled_message
112 112 _("Your request for commenting at %{target} was
113   - not approved by the environment administrator. The following explanation
  113 + not approved by the administrator. The following explanation
114 114 was given: \n\n%{explanation}") %
115 115 { :target => self.target.name,
116 116 :explanation => self.reject_explanation }
117 117 end
118 118  
119 119 def task_finished_message
120   - _('Your request for commenting was approved.
  120 + _('Your request for commenting at %{target} was approved.
121 121 You can access %{url} to see your comment.') %
122   - { :url => ratings_url }
  122 + { :target => self.target.name, :url => ratings_url }
123 123 end
124 124  
125 125 private
... ...
plugins/organization_ratings/lib/organization_ratings_block.rb
... ... @@ -6,7 +6,7 @@ class OrganizationRatingsBlock &lt; Block
6 6 end
7 7  
8 8 def help
9   - _('This block displays the community ratings.')
  9 + _('This block displays the organization ratings.')
10 10 end
11 11  
12 12 def content(args = {})
... ...
plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb
... ... @@ -20,6 +20,6 @@
20 20 <% end %>
21 21  
22 22 <div class="rate-this-organization">
23   - <%= link_to _("Rate this %s" % profile.class.name), url_for(:controller => "organization_ratings_plugin_profile", :action => "new_rating", :profile=>profile_identifier) %>
  23 + <%= link_to _("Rate this %s" % _(profile.class.name)), url_for(:controller => "organization_ratings_plugin_profile", :action => "new_rating", :profile=>profile_identifier) %>
24 24 </div>
25 25 </div>
26 26 \ No newline at end of file
... ...
plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb
1 1 <% config = env_organization_ratings_config %>
2 2  
3   -<h1><%= _("Organization Rating Management") %> </h1>
  3 +<h1><%= _("Organization Rating Settings") %> </h1>
4 4  
5 5 <%= labelled_form_for(:organization_ratings_config, :url => {:action => 'update'}) do |f| %>
6 6 <%= labelled_fields_for(:organization_ratings_config, config) do |c| %>
... ... @@ -14,7 +14,7 @@
14 14 <td><%= c.select :default_rating, (config.minimum_ratings)..5 %></td>
15 15 </tr>
16 16 <tr>
17   - <td><%= _('Can rate an organization only once') %></td>
  17 + <td><%= _('Users can rate an organization only once') %></td>
18 18 <td><%= c.check_box :vote_once %></td>
19 19 </tr>
20 20 <tr>
... ... @@ -38,7 +38,7 @@
38 38 <td><%= c.select :order, order_options %></td>
39 39 </tr>
40 40 <tr>
41   - <td><%= _('Ratings per page') %></td>
  41 + <td><%= _('Ratings amount per page') %></td>
42 42 <td>
43 43 <%= c.select :per_page, 5..20 %>
44 44 </td>
... ...
plugins/organization_ratings/views/shared/_make_report_block.html.erb
... ... @@ -8,7 +8,7 @@
8 8 </div>
9 9  
10 10 <div class="star-profile-name">
11   - <%= logged_in? ? current_user.person.name : _('User not logged *') %>
  11 + <%= logged_in? ? current_user.person.name : _('User not logged') %>
12 12 </div>
13 13 </div>
14 14  
... ...
plugins/organization_ratings/views/shared/_rating_button.html.erb
1 1 <% button_bar do %>
2 2 <% if logged_in? %>
3   - <%= button(:new,_("Rate %s ") % profile.class.name,
  3 + <%= button(:new,_("Rate %s ") % _(profile.class.name),
4 4 {:controller => "organization_ratings_plugin_profile",
5 5 :action => "new_rating"}) %>
6 6 <% else %>
... ...