Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14379256
D17126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D17126.diff
View Options
diff --git a/src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php b/src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php
--- a/src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php
+++ b/src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php
@@ -14,20 +14,52 @@
}
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());
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 2:43 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6917121
Default Alt Text
D17126.diff (2 KB)
Attached To
Mode
D17126: Add more strings for Paste title changes
Attached
Detach File
Event Timeline
Log In to Comment