1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Remove flavor text for action buttons

Summary: A small but appreciable number of users find flavor on buttons confusing. Remove this flavor. This retains flavor in headers, error messages, etc., which doesn't cause confusion.

Test Plan: Looked at a revision, task, paste, macro, etc.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8812
This commit is contained in:
epriestley 2014-04-18 17:51:46 -07:00
parent ba956711a5
commit f1245f4f34
15 changed files with 27 additions and 81 deletions

View file

@ -638,13 +638,6 @@ return array(
'https' => true,
),
// By default, Phabricator includes some silly nonsense in the UI, such as
// a submit button called "Clowncopterize" in Differential and a call to
// "Leap Into Action". If you'd prefer more traditional UI strings like
// "Submit", you can set this flag to disable most of the jokes and easter
// eggs.
'phabricator.serious-business' => false,
// Should Phabricator show beta applications on the homepage
'phabricator.show-beta-applications' => false,

View file

@ -103,8 +103,6 @@ class AphrontDefaultApplicationConfiguration
return $response;
}
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$user = $request->getUser();
if (!$user) {
// If we hit an exception very early, we won't have a user.
@ -175,9 +173,9 @@ class AphrontDefaultApplicationConfiguration
->appendChild($content);
if ($this->getRequest()->isAjax()) {
$dialog->addCancelButton('/', 'Close');
$dialog->addCancelButton('/', pht('Close'));
} else {
$dialog->addCancelButton('/', $is_serious ? 'OK' : 'Away With Thee');
$dialog->addCancelButton('/', pht('OK'));
}
$response = new AphrontDialogResponse();

View file

@ -112,11 +112,11 @@ final class PhabricatorCoreConfigOptions
pht("Should Phabricator be serious?"))
->setDescription(
pht(
"By default, Phabricator includes some silly nonsense in the UI, ".
"such as a submit button called 'Clowncopterize' in Differential ".
"and a call to 'Leap Into Action'. If you'd prefer more ".
"traditional UI strings like 'Submit', you can set this flag to ".
"disable most of the jokes and easter eggs.")),
'By default, Phabricator includes some flavor text in the UI, '.
'like a prompt to "Weigh In" rather than "Add Comment" in '.
'Maniphest. If you\'d prefer more traditional UI strings like '.
'"Add Comment", you can set this flag to disable most of the '.
'extra flavor.')),
$this->newOption('environment.append-paths', 'list<string>', $paths)
->setSummary(
pht("These paths get appended to your \$PATH envrionment variable."))

View file

@ -133,7 +133,6 @@ final class ConpherenceViewController extends
$update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/');
$this->initBehavior('conpherence-pontificate');
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$form =
id(new AphrontFormView())
@ -149,10 +148,7 @@ final class ConpherenceViewController extends
->setValue($draft->getDraft()))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(
$is_serious
? pht('Send')
: pht('Pontificate')))
->setValue(pht('Send Message')))
->appendChild(
javelin_tag(
'input',

View file

@ -52,9 +52,6 @@ final class DifferentialAddCommentView extends AphrontView {
public function render() {
$this->requireResource('differential-revision-add-comment-css');
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$revision = $this->revision;
$action = null;
@ -109,7 +106,7 @@ final class DifferentialAddCommentView extends AphrontView {
->setUser($this->user))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue($is_serious ? pht('Submit') : pht('Clowncopterize')));
->setValue(pht('Submit')));
Javelin::initBehavior(
'differential-add-reviewers-and-ccs',
@ -157,8 +154,13 @@ final class DifferentialAddCommentView extends AphrontView {
'inline' => 'inline-comment-preview',
));
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$header_text = $is_serious
? pht('Add Comment')
: pht('Leap Into Action');
$header = id(new PHUIHeaderView())
->setHeader($is_serious ? pht('Add Comment') : pht('Leap Into Action'));
->setHeader($header_text);
$anchor = id(new PhabricatorAnchorView())
->setAnchorName('comment')

View file

@ -764,7 +764,7 @@ final class DiffusionCommitController extends DiffusionController {
->setUser($user))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue($is_serious ? pht('Submit') : pht('Cook the Books')));
->setValue(pht('Submit')));
$header = new PHUIHeaderView();
$header->setHeader(

View file

@ -99,10 +99,6 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
? pht('Add Comment')
: pht('Question File Integrity');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Debate the Bits');
$draft = PhabricatorDraft::newFromUserAndKey($user, $file->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -111,7 +107,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
->setDraft($draft)
->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$file->getID().'/'))
->setSubmitButtonName($submit_button_name);
->setSubmitButtonName(pht('Add Comment'));
return array(
$timeline,

View file

@ -210,17 +210,13 @@ final class LegalpadDocumentViewController extends LegalpadController {
? pht('Add Comment')
: pht('Debate Legislation');
$button_name = $is_serious
? pht('Add Comment')
: pht('Commence Filibuster');
$form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($user)
->setObjectPHID($document->getPHID())
->setFormID($comment_form_id)
->setHeaderText($title)
->setDraft($draft)
->setSubmitButtonName($button_name)
->setSubmitButtonName(pht('Add Comment'))
->setAction($this->getApplicationURI('/comment/'.$document->getID().'/'))
->setRequestURI($this->getRequest()->getRequestURI());

View file

@ -87,10 +87,6 @@ final class PhabricatorMacroViewController
? pht('Add Comment')
: pht('Grovel in Awe');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Lavish Praise');
$draft = PhabricatorDraft::newFromUserAndKey($user, $macro->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -99,7 +95,7 @@ final class PhabricatorMacroViewController
->setDraft($draft)
->setHeaderText($comment_header)
->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/'))
->setSubmitButtonName($submit_button_name);
->setSubmitButtonName(pht('Add Comment'));
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)

View file

@ -205,16 +205,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
$draft_text = null;
}
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$submit_text = $is_serious
? pht('Submit')
: pht('Avast!');
$close_text = $is_serious
? pht('Close Task')
: pht('Scuttle Task');
$submit_control = id(new PHUIFormMultiSubmitControl());
if (!$task->isClosed()) {
$close_image = id(new PHUIIconView())
@ -224,11 +214,11 @@ final class ManiphestTaskDetailController extends ManiphestController {
id(new PHUIButtonView())
->setColor(PHUIButtonView::GREY)
->setIcon($close_image)
->setText($close_text)
->setText(pht('Close Task'))
->setName('scuttle')
->addSigil('alternate-submit-button'));
}
$submit_control->addSubmitButton($submit_text);
$submit_control->addSubmitButton(pht('Submit'));
$comment_form = new AphrontFormView();
$comment_form
@ -343,6 +333,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
));
}
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$comment_header = $is_serious
? pht('Add Comment')
: pht('Weigh In');

View file

@ -118,10 +118,6 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
? pht('Add Comment')
: pht('Debate Paste Accuracy');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Pity the Fool');
$draft = PhabricatorDraft::newFromUserAndKey($user, $paste->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -130,7 +126,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
->setDraft($draft)
->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$paste->getID().'/'))
->setSubmitButtonName($submit_button_name);
->setSubmitButtonName(pht('Add Comment'));
return $this->buildApplicationPage(
array(

View file

@ -235,22 +235,17 @@ final class PholioMockViewController extends PholioController {
$draft = PhabricatorDraft::newFromUserAndKey($user, $mock->getPHID());
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$title = $is_serious
? pht('Add Comment')
: pht('History Beckons');
$button_name = $is_serious
? pht('Add Comment')
: pht('Answer The Call');
$form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($user)
->setObjectPHID($mock->getPHID())
->setFormID($comment_form_id)
->setDraft($draft)
->setHeaderText($title)
->setSubmitButtonName($button_name)
->setSubmitButtonName(pht('Add Comment'))
->setAction($this->getApplicationURI('/comment/'.$mock->getID().'/'))
->setRequestURI($this->getRequest()->getRequestURI());

View file

@ -15,7 +15,6 @@ final class PhrictionMoveController
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
if ($this->id) {
$document = id(new PhrictionDocument())->load($this->id);
@ -114,9 +113,6 @@ final class PhrictionMoveController
->setErrors($errors);
}
$descr_caption = $is_serious ? pht('A reason for the move.') :
pht('You better give a good reason for this.');
$form = id(new PHUIFormLayoutView())
->setUser($user)
->appendChild(
@ -135,8 +131,7 @@ final class PhrictionMoveController
->setLabel(pht('Edit Notes'))
->setValue($content->getDescription())
->setError(null)
->setName('description')
->setCaption($descr_caption));
->setName('description'));
$dialog = id(new AphrontDialogView())
->setUser($user)

View file

@ -17,8 +17,6 @@ final class PonderAddAnswerView extends AphrontView {
}
public function render() {
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$question = $this->question;
$header = id(new PHUIHeaderView())
@ -39,9 +37,7 @@ final class PonderAddAnswerView extends AphrontView {
->setUser($this->user))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue($is_serious ?
pht('Add Answer') :
pht('Bequeath Wisdom')));
->setValue(pht('Add Answer')));
return id(new PHUIObjectBoxView())
->setHeader($header)

View file

@ -164,10 +164,6 @@ final class PhabricatorSlowvotePollController
? pht('Add Comment')
: pht('Enter Deliberations');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Perhaps');
$draft = PhabricatorDraft::newFromUserAndKey($viewer, $poll->getPHID());
return id(new PhabricatorApplicationTransactionCommentView())
@ -176,7 +172,7 @@ final class PhabricatorSlowvotePollController
->setDraft($draft)
->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$poll->getID().'/'))
->setSubmitButtonName($submit_button_name);
->setSubmitButtonName(pht('Add Comment'));
}