From 5efb29a17453b7d7f589492bfb5b8cb400faa1fd Mon Sep 17 00:00:00 2001 From: Tallys Martins Date: Fri, 11 Sep 2015 18:28:07 -0300 Subject: [PATCH] organization ratings: fix strings for translations --- plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb | 2 +- plugins/organization_ratings/lib/create_organization_rating_comment.rb | 16 ++++++++-------- plugins/organization_ratings/lib/organization_ratings_block.rb | 2 +- plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb | 2 +- plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb | 6 +++--- plugins/organization_ratings/views/shared/_make_report_block.html.erb | 2 +- plugins/organization_ratings/views/shared/_rating_button.html.erb | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb b/plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb index 6381c53..7463c63 100644 --- a/plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb +++ b/plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb @@ -12,7 +12,7 @@ class OrganizationRatingsPluginProfileController < ProfileController if @rating_available create_new_rate else - session[:notice] = _("You can not vote on this %s") % profile.class.name + session[:notice] = _("You can not vote on this %s") % _(profile.class.name) end end end diff --git a/plugins/organization_ratings/lib/create_organization_rating_comment.rb b/plugins/organization_ratings/lib/create_organization_rating_comment.rb index 90a0dc0..1ce9fb0 100644 --- a/plugins/organization_ratings/lib/create_organization_rating_comment.rb +++ b/plugins/organization_ratings/lib/create_organization_rating_comment.rb @@ -63,7 +63,7 @@ class CreateOrganizationRatingComment < Task def information message = _("%{requestor} wants to create a comment in this %{target_class}") % - {:requestor_url => url_for(self.requestor.url), :requestor => self.requestor.name, :target_class => self.target.class.name.downcase} + {:requestor_url => url_for(self.requestor.url), :requestor => self.requestor.name, :target_class => _(self.target.class.name)} {:message => message} end @@ -88,20 +88,20 @@ class CreateOrganizationRatingComment < Task def target_notification_description _("%{requestor} wants to create a comment in this \"%{target}\"") % - {:requestor => self.requestor.name, :target => self.target.class.name.downcase } + {:requestor => self.requestor.name, :target => _(self.target.class.name.downcase) } end def target_notification_message - _("User \"%{user}\" just requested to create a comment in the %{target_class} + _("User \"%{user}\" requested to create a comment in the %{target_class} \"%{target_name}\". You have to approve or reject it through the \"Pending Validations\" section in your control panel.\n") % - { :user => self.requestor.name, :target_class => self.target.class.name.downcase, :target_name => self.target.name } + { :user => self.requestor.name, :target_class => _(self.target.class.name.downcase), :target_name => self.target.name } end def task_created_message _("Your request for commenting at %{target} was - just sent. Environment administrator will receive it and will approve or + just sent. The administrator will receive it and will approve or reject your request according to his methods and criteria. You will be notified as soon as environment administrator has a position about your request.") % @@ -110,16 +110,16 @@ class CreateOrganizationRatingComment < Task def task_cancelled_message _("Your request for commenting at %{target} was - not approved by the environment administrator. The following explanation + not approved by the administrator. The following explanation was given: \n\n%{explanation}") % { :target => self.target.name, :explanation => self.reject_explanation } end def task_finished_message - _('Your request for commenting was approved. + _('Your request for commenting at %{target} was approved. You can access %{url} to see your comment.') % - { :url => ratings_url } + { :target => self.target.name, :url => ratings_url } end private diff --git a/plugins/organization_ratings/lib/organization_ratings_block.rb b/plugins/organization_ratings/lib/organization_ratings_block.rb index 9975eb9..58b607c 100644 --- a/plugins/organization_ratings/lib/organization_ratings_block.rb +++ b/plugins/organization_ratings/lib/organization_ratings_block.rb @@ -6,7 +6,7 @@ class OrganizationRatingsBlock < Block end def help - _('This block displays the community ratings.') + _('This block displays the organization ratings.') end def content(args = {}) diff --git a/plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb b/plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb index 2d4da83..63ebd33 100644 --- a/plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb +++ b/plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb @@ -20,6 +20,6 @@ <% end %>
- <%= link_to _("Rate this %s" % profile.class.name), url_for(:controller => "organization_ratings_plugin_profile", :action => "new_rating", :profile=>profile_identifier) %> + <%= link_to _("Rate this %s" % _(profile.class.name)), url_for(:controller => "organization_ratings_plugin_profile", :action => "new_rating", :profile=>profile_identifier) %>
\ No newline at end of file diff --git a/plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb b/plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb index 212e377..6874af5 100644 --- a/plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb +++ b/plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb @@ -1,6 +1,6 @@ <% config = env_organization_ratings_config %> -

<%= _("Organization Rating Management") %>

+

<%= _("Organization Rating Settings") %>

<%= labelled_form_for(:organization_ratings_config, :url => {:action => 'update'}) do |f| %> <%= labelled_fields_for(:organization_ratings_config, config) do |c| %> @@ -14,7 +14,7 @@ <%= c.select :default_rating, (config.minimum_ratings)..5 %> - <%= _('Can rate an organization only once') %> + <%= _('Users can rate an organization only once') %> <%= c.check_box :vote_once %> @@ -38,7 +38,7 @@ <%= c.select :order, order_options %> - <%= _('Ratings per page') %> + <%= _('Ratings amount per page') %> <%= c.select :per_page, 5..20 %> diff --git a/plugins/organization_ratings/views/shared/_make_report_block.html.erb b/plugins/organization_ratings/views/shared/_make_report_block.html.erb index d608af9..12b7c0e 100644 --- a/plugins/organization_ratings/views/shared/_make_report_block.html.erb +++ b/plugins/organization_ratings/views/shared/_make_report_block.html.erb @@ -8,7 +8,7 @@
- <%= logged_in? ? current_user.person.name : _('User not logged *') %> + <%= logged_in? ? current_user.person.name : _('User not logged') %>
diff --git a/plugins/organization_ratings/views/shared/_rating_button.html.erb b/plugins/organization_ratings/views/shared/_rating_button.html.erb index 67cf037..0d8258a 100644 --- a/plugins/organization_ratings/views/shared/_rating_button.html.erb +++ b/plugins/organization_ratings/views/shared/_rating_button.html.erb @@ -1,6 +1,6 @@ <% button_bar do %> <% if logged_in? %> - <%= button(:new,_("Rate %s ") % profile.class.name, + <%= button(:new,_("Rate %s ") % _(profile.class.name), {:controller => "organization_ratings_plugin_profile", :action => "new_rating"}) %> <% else %> -- libgit2 0.21.2