mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Add more strings for Paste title changes
Summary: See downstream: <https://phabricator.wikimedia.org/T154367> Test Plan: {F2286968} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D17126
This commit is contained in:
parent
3d52f07ee7
commit
71de5f2da2
1 changed files with 43 additions and 11 deletions
|
@ -14,20 +14,52 @@ final class PhabricatorPasteTitleTransaction
|
|||
}
|
||||
|
||||
public function getTitle() {
|
||||
return pht(
|
||||
'%s changed the title of this paste from %s to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderOldValue(),
|
||||
$this->renderNewValue());
|
||||
$old = $this->getOldValue();
|
||||
$new = $this->getNeWValue();
|
||||
|
||||
if (strlen($old) && strlen($new)) {
|
||||
return pht(
|
||||
'%s changed the title of this paste from %s to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderOldValue(),
|
||||
$this->renderNewValue());
|
||||
} else if (strlen($new)) {
|
||||
return pht(
|
||||
'%s changed the title of this paste from untitled to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderNewValue());
|
||||
} else {
|
||||
return pht(
|
||||
'%s changed the title of this paste from %s to untitled.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderOldValue());
|
||||
}
|
||||
}
|
||||
|
||||
public function getTitleForFeed() {
|
||||
return pht(
|
||||
'%s updated the title for %s from %s to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderObject(),
|
||||
$this->renderOldValue(),
|
||||
$this->renderNewValue());
|
||||
$old = $this->getOldValue();
|
||||
$new = $this->getNeWValue();
|
||||
|
||||
if (strlen($old) && strlen($new)) {
|
||||
return pht(
|
||||
'%s updated the title for %s from %s to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderObject(),
|
||||
$this->renderOldValue(),
|
||||
$this->renderNewValue());
|
||||
} else if (strlen($new)) {
|
||||
return pht(
|
||||
'%s updated the title for %s from untitled to %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderObject(),
|
||||
$this->renderNewValue());
|
||||
} else {
|
||||
return pht(
|
||||
'%s updated the title for %s from %s to untitled.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderObject(),
|
||||
$this->renderOldValue());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue