From 9cf5bc30cdc057d39fa318583defeb2f285de65e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 27 Jul 2017 14:30:35 -0700 Subject: [PATCH] Fix some copy and bugs in Ponder Summary: Fixes T12939. Fixes some feed stories, mailtags, and headers. Test Plan: Review changes locally by asking how babby is formed. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12939 Differential Revision: https://secure.phabricator.com/D18285 --- .../controller/PonderQuestionViewController.php | 2 +- .../ponder/editor/PonderQuestionEditor.php | 4 ++-- .../ponder/storage/PonderAnswerTransaction.php | 7 +++++++ .../xaction/PonderAnswerContentTransaction.php | 17 +++++++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/applications/ponder/controller/PonderQuestionViewController.php b/src/applications/ponder/controller/PonderQuestionViewController.php index 59da519834..2cd555204c 100644 --- a/src/applications/ponder/controller/PonderQuestionViewController.php +++ b/src/applications/ponder/controller/PonderQuestionViewController.php @@ -94,7 +94,7 @@ final class PonderQuestionViewController extends PonderController { $wiki = new PHUIRemarkupView($viewer, $question->getAnswerWiki()); $answer_wiki = id(new PHUIObjectBoxView()) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) - ->setHeaderText(pht('ANSWER SUMMARY')) + ->setHeaderText(pht('Answer Summary')) ->appendChild($wiki) ->addClass('ponder-answer-wiki'); } diff --git a/src/applications/ponder/editor/PonderQuestionEditor.php b/src/applications/ponder/editor/PonderQuestionEditor.php index a17aebecf8..0720f436b9 100644 --- a/src/applications/ponder/editor/PonderQuestionEditor.php +++ b/src/applications/ponder/editor/PonderQuestionEditor.php @@ -10,11 +10,11 @@ final class PonderQuestionEditor } public function getCreateObjectTitle($author, $object) { - return pht('%s created this question.', $author); + return pht('%s asked this question.', $author); } public function getCreateObjectTitleForFeed($author, $object) { - return pht('%s created %s.', $author, $object); + return pht('%s asked %s.', $author, $object); } /** diff --git a/src/applications/ponder/storage/PonderAnswerTransaction.php b/src/applications/ponder/storage/PonderAnswerTransaction.php index 784b8a36e7..efbe020106 100644 --- a/src/applications/ponder/storage/PonderAnswerTransaction.php +++ b/src/applications/ponder/storage/PonderAnswerTransaction.php @@ -23,4 +23,11 @@ final class PonderAnswerTransaction return 'PonderAnswerTransactionType'; } + public function getMailTags() { + $tags = parent::getMailTags(); + $tags[] = PonderQuestionTransaction::MAILTAG_OTHER; + + return $tags; + } + } diff --git a/src/applications/ponder/xaction/PonderAnswerContentTransaction.php b/src/applications/ponder/xaction/PonderAnswerContentTransaction.php index 5d5c6ad157..2e55ef5fea 100644 --- a/src/applications/ponder/xaction/PonderAnswerContentTransaction.php +++ b/src/applications/ponder/xaction/PonderAnswerContentTransaction.php @@ -14,12 +14,29 @@ final class PonderAnswerContentTransaction } public function getTitle() { + $old = $this->getOldValue(); + + if (!strlen($old)) { + return pht( + '%s added an answer.', + $this->renderAuthor()); + } + return pht( '%s updated the answer details.', $this->renderAuthor()); } public function getTitleForFeed() { + $old = $this->getOldValue(); + + if (!strlen($old)) { + return pht( + '%s added %s.', + $this->renderAuthor(), + $this->renderObject()); + } + return pht( '%s updated the answer details for %s.', $this->renderAuthor(),