Commit 2334dee4b7b100676f30d6fc064103f722eec2ce
1 parent
0f602cc1
Exists in
master
and in
29 other branches
ActionItem628: reviewing of generated messages
Showing
4 changed files
with
9 additions
and
13 deletions
Show diff stats
app/models/add_friend.rb
| @@ -18,7 +18,7 @@ class AddFriend < Task | @@ -18,7 +18,7 @@ class AddFriend < Task | ||
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | def description | 20 | def description |
| 21 | - _('%s wants to be your friend') % requestor.name | 21 | + _('%s wants to be your friend.') % requestor.name |
| 22 | end | 22 | end |
| 23 | 23 | ||
| 24 | def permission | 24 | def permission |
| @@ -27,7 +27,7 @@ class AddFriend < Task | @@ -27,7 +27,7 @@ class AddFriend < Task | ||
| 27 | 27 | ||
| 28 | def target_notification_message | 28 | def target_notification_message |
| 29 | description + "\n\n" + | 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 | end | 31 | end |
| 32 | 32 | ||
| 33 | end | 33 | end |
app/models/add_member.rb
| @@ -5,12 +5,8 @@ class AddMember < Task | @@ -5,12 +5,8 @@ class AddMember < Task | ||
| 5 | alias :person :requestor | 5 | alias :person :requestor |
| 6 | alias :person= :requestor= | 6 | alias :person= :requestor= |
| 7 | 7 | ||
| 8 | - alias :community :target | ||
| 9 | - alias :community= :target= | ||
| 10 | alias :organization :target | 8 | alias :organization :target |
| 11 | alias :organization= :target= | 9 | alias :organization= :target= |
| 12 | - alias :enterprise :target | ||
| 13 | - alias :enterprise= :target= | ||
| 14 | 10 | ||
| 15 | acts_as_having_settings :roles, :field => :data | 11 | acts_as_having_settings :roles, :field => :data |
| 16 | 12 | ||
| @@ -20,7 +16,7 @@ class AddMember < Task | @@ -20,7 +16,7 @@ class AddMember < Task | ||
| 20 | end | 16 | end |
| 21 | 17 | ||
| 22 | def description | 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 | end | 20 | end |
| 25 | 21 | ||
| 26 | def permission | 22 | def permission |
| @@ -29,7 +25,7 @@ class AddMember < Task | @@ -29,7 +25,7 @@ class AddMember < Task | ||
| 29 | 25 | ||
| 30 | def target_notification_message | 26 | def target_notification_message |
| 31 | description + "\n\n" + | 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 | end | 29 | end |
| 34 | 30 | ||
| 35 | end | 31 | end |
app/models/task_mailer.rb
| @@ -15,7 +15,7 @@ class TaskMailer < ActionMailer::Base | @@ -15,7 +15,7 @@ class TaskMailer < ActionMailer::Base | ||
| 15 | recipients task.target.contact_email | 15 | recipients task.target.contact_email |
| 16 | 16 | ||
| 17 | from self.class.generate_from(task) | 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 | body :requestor => task.requestor.name, | 19 | body :requestor => task.requestor.name, |
| 20 | :target => task.target.name, | 20 | :target => task.target.name, |
| 21 | :message => msg, | 21 | :message => msg, |
| @@ -39,7 +39,7 @@ class TaskMailer < ActionMailer::Base | @@ -39,7 +39,7 @@ class TaskMailer < ActionMailer::Base | ||
| 39 | 39 | ||
| 40 | recipients task.requestor.email | 40 | recipients task.requestor.email |
| 41 | from self.class.generate_from(task) | 41 | from self.class.generate_from(task) |
| 42 | - subject task.description | 42 | + subject '[%s] %s' % [task.requestor.environment.name, task.description] |
| 43 | body :requestor => task.requestor.name, | 43 | body :requestor => task.requestor.name, |
| 44 | :message => text, | 44 | :message => text, |
| 45 | :environment => task.requestor.environment.name, | 45 | :environment => task.requestor.environment.name, |
app/views/task_mailer/target_notification.rhtml