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