Commit 8b20b36c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Make activity notifications more translatable (bug #1759)

parent 3f4f74fb
......@@ -67,14 +67,17 @@ $string['stopmonitoringsuccess'] = 'Stopped monitoring successfully';
$string['stopmonitoringfailed'] = 'Failed to stop monitoring';
$string['newwatchlistmessagesubject'] = 'New activity on your watchlist';
$string['newwatchlistmessageview'] = 'has changed their view "%s"';
$string['newwatchlistmessageview'] = '%s has changed their view "%s"';
$string['newviewsubject'] = 'New view created';
$string['newviewmessage'] = '%s has created a new view "%s"';
$string['newcontactusfrom'] = 'New contact us from';
$string['newcontactus'] = 'New contact us';
$string['newfeedbackonview'] = 'New feedback on view';
$string['newfeedbackonartefact'] = 'New feedback on artefact';
$string['newviewaccessmessage'] = 'You have been added to the access list for the view called';
$string['newviewaccessmessage'] = 'You have been added to the access list for the view called "%s" by %s';
$string['newviewaccesssubject'] = 'New view access';
$string['viewmodified'] = 'has changed their view';
......
......@@ -638,9 +638,8 @@ class ActivityTypeWatchlist extends ActivityType {
}
public function get_message($user) {
return display_name($this->viewinfo, $user) . ' '
. get_string_from_language($user->lang, 'newwatchlistmessageview', 'activity',
$this->viewinfo->title);
return get_string_from_language($user->lang, 'newwatchlistmessageview', 'activity',
display_name($this->viewinfo, $user), $this->viewinfo->title);
}
public function get_required_parameters() {
......@@ -677,8 +676,8 @@ class ActivityTypeNewview extends ActivityType {
}
public function get_message($user) {
return display_name($this->viewinfo, $user) . ' '
. get_string_from_language($user->lang, 'newviewmessage', 'activity', $this->viewinfo->title);
return get_string_from_language($user->lang, 'newviewmessage', 'activity',
display_name($this->viewinfo, $user), $this->viewinfo->title);
}
public function get_required_parameters() {
......@@ -716,9 +715,8 @@ class ActivityTypeViewaccess extends ActivityType {
}
public function get_message($user) {
return get_string_from_language($user->lang, 'newviewaccessmessage', 'activity')
. ' "' . $this->viewinfo->title . '" ' . get_string_from_language($user->lang, 'ownedby', 'activity')
. ' ' . display_name($this->viewinfo, $user);
return get_string_from_language($user->lang, 'newviewaccessmessage', 'activity',
$this->viewinfo->title, display_name($this->viewinfo, $user));
}
public function get_required_parameters() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment