"Notice posted" message in Ajax title for NewnoticeAction
This commit is contained in:
parent
60016b0a8f
commit
eb955fe629
@ -58,6 +58,10 @@ class NewnoticeAction extends FormAction
|
|||||||
*/
|
*/
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
if ($this->getInfo() && $this->stored instanceof Notice) {
|
||||||
|
// TRANS: Page title after sending a notice.
|
||||||
|
return _('Notice posted');
|
||||||
|
}
|
||||||
// TRANS: Page title for sending a new notice.
|
// TRANS: Page title for sending a new notice.
|
||||||
return _m('TITLE','New notice');
|
return _m('TITLE','New notice');
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
$this->startHTML('text/xml;charset=utf-8');
|
$this->startHTML('text/xml;charset=utf-8');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Title for conversation page.
|
// TRANS: Title for conversation page.
|
||||||
$this->element('title', null, _m('TITLE','Notice'));
|
$this->element('title', null, $this->title());
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
if ($this->getError()) {
|
if ($this->getError()) {
|
||||||
|
@ -86,9 +86,11 @@ class FavorAction extends FormAction
|
|||||||
$act->title = ActivityUtils::verbToTitle($act->verb);
|
$act->title = ActivityUtils::verbToTitle($act->verb);
|
||||||
$act->time = strtotime($now);
|
$act->time = strtotime($now);
|
||||||
// TRANS: Notification given when a user marks a notice as favorite.
|
// TRANS: Notification given when a user marks a notice as favorite.
|
||||||
// TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
|
// TRANS: %1$s is a user name or full name, %2$s is a notice URI, %3$s the link to the user's profile.
|
||||||
$act->content = sprintf(_('%1$s marked notice %2$s as a favorite.'),
|
$act->content = sprintf(_('<a href="%3$s">%1$s</a> marked notice <a href="%2$s">%2$s</a> as a favorite.'),
|
||||||
$this->scoped->getBestName(), $this->target->getUrl());
|
htmlspecialchars($this->scoped->getBestName()),
|
||||||
|
htmlspecialchars($this->target->getUrl()),
|
||||||
|
htmlspecialchars($this->scoped->getUrl()));
|
||||||
|
|
||||||
|
|
||||||
$stored = Notice::saveActivity($act, $this->scoped,
|
$stored = Notice::saveActivity($act, $this->scoped,
|
||||||
|
@ -142,11 +142,7 @@ class Fave extends Managed_DataObject
|
|||||||
$act->time = strtotime($this->created);
|
$act->time = strtotime($this->created);
|
||||||
// TRANS: Activity title when marking a notice as favorite.
|
// TRANS: Activity title when marking a notice as favorite.
|
||||||
$act->title = _("Favor");
|
$act->title = _("Favor");
|
||||||
// If the rendered notice content does not exist, generate our own content.
|
$act->content = $target->rendered ?: $target->content;
|
||||||
// TRANS: Notification given when a user marks a notice as favorite.
|
|
||||||
// TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
|
|
||||||
$act->content = $target->rendered ?: sprintf(_('%1$s marked notice %2$s as a favorite.'),
|
|
||||||
$actor->getBestName(), $target->getUrl());
|
|
||||||
|
|
||||||
$act->actor = $actor->asActivityObject();
|
$act->actor = $actor->asActivityObject();
|
||||||
$act->target = $target->asActivityObject();
|
$act->target = $target->asActivityObject();
|
||||||
@ -290,12 +286,7 @@ class Fave extends Managed_DataObject
|
|||||||
$actobj->objects = array(clone($actobj->target));
|
$actobj->objects = array(clone($actobj->target));
|
||||||
$actobj->verb = ActivityVerb::FAVORITE;
|
$actobj->verb = ActivityVerb::FAVORITE;
|
||||||
$actobj->title = ActivityUtils::verbToTitle($actobj->verb);
|
$actobj->title = ActivityUtils::verbToTitle($actobj->verb);
|
||||||
// If the rendered notice content does not exist, generate our own content.
|
$actobj->content = $target->rendered ?: $target->content;
|
||||||
// TRANS: Notification given when a user marks a notice as favorite.
|
|
||||||
// TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
|
|
||||||
$actobj->content = $target->rendered ?: sprintf(_('%1$s marked notice %2$s as a favorite.'),
|
|
||||||
$this->getActor()->getBestName(),
|
|
||||||
$this->getTarget()->getUrl());
|
|
||||||
return $actobj;
|
return $actobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user