Commit 2334dee4b7b100676f30d6fc064103f722eec2ce

Authored by Antonio Terceiro
1 parent 0f602cc1

ActionItem628: reviewing of generated messages

app/models/add_friend.rb
... ... @@ -18,7 +18,7 @@ class AddFriend < Task
18 18 end
19 19  
20 20 def description
21   - _('%s wants to be your friend') % requestor.name
  21 + _('%s wants to be your friend.') % requestor.name
22 22 end
23 23  
24 24 def permission
... ... @@ -27,7 +27,7 @@ class AddFriend < Task
27 27  
28 28 def target_notification_message
29 29 description + "\n\n" +
30   - _('You need login to accept this.')
  30 + _('You need to login to %{system} in order to accept %{requestor} as your friend. You can use the address below to do that.') % { :system => target.environment.name, :requestor => requestor.name }
31 31 end
32 32  
33 33 end
... ...
app/models/add_member.rb
... ... @@ -5,12 +5,8 @@ class AddMember < Task
5 5 alias :person :requestor
6 6 alias :person= :requestor=
7 7  
8   - alias :community :target
9   - alias :community= :target=
10 8 alias :organization :target
11 9 alias :organization= :target=
12   - alias :enterprise :target
13   - alias :enterprise= :target=
14 10  
15 11 acts_as_having_settings :roles, :field => :data
16 12  
... ... @@ -20,7 +16,7 @@ class AddMember < Task
20 16 end
21 17  
22 18 def description
23   - _('%s wants to be a member') % requestor.name
  19 + _('%s wants to be a member of "%s".') % [requestor.name, organization.name]
24 20 end
25 21  
26 22 def permission
... ... @@ -29,7 +25,7 @@ class AddMember < Task
29 25  
30 26 def target_notification_message
31 27 description + "\n\n" +
32   - _('You need login to accept this.')
  28 + _('You will need login to %{system} in order to accept or reject %{requestor} as a member of %{organization}.') % { :system => target.environment.name, :requestor => requestor.name, :organization => organization.name }
33 29 end
34 30  
35 31 end
... ...
app/models/task_mailer.rb
... ... @@ -15,7 +15,7 @@ class TaskMailer < ActionMailer::Base
15 15 recipients task.target.contact_email
16 16  
17 17 from self.class.generate_from(task)
18   - subject _('%s - %s') % [task.requestor.environment.name, task.description]
  18 + subject '[%s] %s' % [task.requestor.environment.name, task.description]
19 19 body :requestor => task.requestor.name,
20 20 :target => task.target.name,
21 21 :message => msg,
... ... @@ -39,7 +39,7 @@ class TaskMailer < ActionMailer::Base
39 39  
40 40 recipients task.requestor.email
41 41 from self.class.generate_from(task)
42   - subject task.description
  42 + subject '[%s] %s' % [task.requestor.environment.name, task.description]
43 43 body :requestor => task.requestor.name,
44 44 :message => text,
45 45 :environment => task.requestor.environment.name,
... ...
app/views/task_mailer/target_notification.rhtml
1   -<%= _('Dear %s,') % @target %>
  1 +<%= _('Hello %s,') % @target %>
2 2  
3   -<%= @message %>
  3 +<%= word_wrap(@message) %>
4 4  
5 5 --
6   -<%= _('%s environment system') % @environment %>
  6 +<%= @environment %>
7 7 <%= @url %>
... ...