r112664 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112663‎ | r112664 | r112665 >
Date:01:30, 29 February 2012
Author:raindrift
Status:deferred (Comments)
Tags:
Comment:
updating language to match Howie's google doc
linking to actual pages instead of google
note: the 'learn more' link target could be written more portably
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.i18n.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/SpecialArticleCreationLanding.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.i18n.php
@@ -14,10 +14,10 @@
1515 'article-creation-desc' => 'Adds a more user-friendly article creation pageflow.',
1616
1717 'ac-hover-tooltip-title' => 'Select this if...',
18 - 'ac-landing-page-title' => 'Article creation landing page',
 18+ 'ac-landing-page-title' => 'Create an article about "$1" on {{SITENAME}}',
1919
2020 //buttons
21 - 'ac-action-indicator' => 'I want to...',
 21+ 'ac-action-indicator' => 'To create an article on {{SITENAME}}, you may...',
2222
2323 'ac-action-login' => 'Log in to {{SITENAME}}',
2424 'ac-action-login-subtitle' => 'I have a {{SITENAME}} account.',
@@ -27,9 +27,9 @@
2828 'ac-action-signup-subtitle' => 'A {{SITENAME}} account allows you to create new articles.',
2929 'ac-hover-tooltip-body-signup' => "<ul><li>You <b><i>do not</i></b> have a {{SITENAME}} account.</li></ul>",
3030
31 - 'ac-action-request' => 'Request this article',
32 - 'ac-action-request-subtitle' => "I'll submit a request that it be written.",
33 - 'ac-action-request-subtitle-anon' => "I'll submit a request that it be written.",
 31+ 'ac-action-request' => 'Use the Article Creation Wizard',
 32+ 'ac-action-request-subtitle' => "Let the Wizard guide me through the process.",
 33+ 'ac-action-request-subtitle-anon' => "Let the Wizard guide me through the process.",
3434 'ac-hover-tooltip-body-request' => "<ul><li> You want to see the article exist, and</li>
3535 <li>You do not wish to write it yourself.</li></ul>",
3636
@@ -39,17 +39,18 @@
4040 'ac-hover-tooltip-body-exit' => '<ul><li>You want to go back to previous page.</li></ul>',
4141
4242 'ac-action-draft' => 'Create a draft',
43 - 'ac-action-draft-subtitle' => 'I want to make a draft of this article before I publish it to {{SITENAME}}.',
 43+ 'ac-action-draft-subtitle' => "This is my first article.",
4444 'ac-hover-tooltip-body-draft' => "<ul><li>You haven't created an article before, or</li>
4545 <li>You want to work on your article a bit before it's ready to publish</li></ul>",
4646
4747 'ac-action-create' => 'Create this article myself',
48 - 'ac-action-create-subtitle' => 'I know what I\'m doing.',
49 - 'ac-create-warning-create' => "Articles may be deleted immediately if:
50 - <ul><li>they copy from other sources, or</li>
 48+ 'ac-action-create-subtitle' => 'I\'ve done this before.',
 49+ 'ac-create-warning-create' => "We value your time and want to make sure your contributions are the kind that will improve Wikipedia.
 50+ Articles on Wikipedia should be about notable topics and be written in an unbiased manner.<br/><br/>
 51+ Articles may be deleted if:
 52+ <ul><li>they copy material from other sources, or</li>
5153 <li>are overly promotional, or</li>
52 - <li>lack context, or</li>
53 - <li>fail to explain why their subject is notable.</li></ul>
 54+ <li>do not clearly state why the subject is important.</li></ul>
5455 ",
5556 'ac-create-button' => "Let's Go",
5657 'ac-hover-tooltip-body-create' => "<ul><li>You have created articles before, and</li>
@@ -60,7 +61,7 @@
6162
6263 'ac-landing-login-required' => 'In order to create an article, you need to have a {{SITENAME}} user account.',
6364
64 - 'ac-create-dismiss' => 'I want to skip this step in the future',
 65+ 'ac-create-dismiss' => 'Skip this step in the future',
6566
6667 'ac-create-help' => 'Learn more',
6768 'ac-click-tip-title-create' => 'I know that…',
@@ -70,7 +71,7 @@
7172 'article-creation-desc' => 'Extension description.',
7273
7374 'ac-hover-tooltip-title' => 'The title for the tooltip displayed next to the buttons',
74 - 'ac-landing-page-title' => 'The title of the landing page',
 75+ 'ac-landing-page-title' => 'The title of the landing page. Parameter is the title of the article the user is attempting to create.',
7576
7677 //buttons
7778 'ac-action-indicator' => 'Introduction for the selection of the action that the user wants to take ("I want to...")',
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php
@@ -153,7 +153,7 @@
154154 'text' => 'ac-hover-tooltip-body-create',
155155 ),
156156 'interstitial' => <<<HTML
157 - <a class="mw-ac-help" href="http://www.google.com"><html:msg key="ac-create-help" /></a>
 157+ <a class="mw-ac-help" href="https://www.mediawiki.org/wiki/Wikipedia:Starting_an_article"><html:msg key="ac-create-help" /></a>
158158 <div class="mw-ac-tooltip-title"><html:msg key="ac-click-tip-title-create" /></div>
159159 <div class="mw-ac-tooltip-body">
160160 <div class="mw-ac-create-verbiage"><html:msg raw="1" key="ac-create-warning-create" /></div>
@@ -188,7 +188,7 @@
189189 'create' => '{{SCRIPT}}?title={{PAGE}}&action=edit&acwbucket={{BUCKETID}}&acwsource={{SOURCE}}',
190190 'login' => '{{SCRIPT}}?title=Special:Userlogin&returnto=Special:ArticleCreationLanding/{{PAGE}}',
191191 'signup' => '{{SCRIPT}}?title=Special:Userlogin/signup&returnto=Special:ArticleCreationLanding/{{PAGE}}&returntoquery=' . urlencode( 'fromsignup=1' ),
192 - 'request' => 'http://google.com/?q={{PAGE}}',
 192+ 'request' => '{{SCRIPT}}?title=Wikipedia:Article_wizard',
193193 'exit' => 'javascript:history.go(-1)',
194194 ),
195195 'buttons' => $wgArticleCreationButtons,
Index: trunk/extensions/ArticleCreationWorkflow/SpecialArticleCreationLanding.php
@@ -7,10 +7,11 @@
88 public function __construct() {
99 //Do not list this special page under Special:SpecialPages
1010 parent::__construct( 'ArticleCreationLanding', '', false );
 11+ $this->pageTitle = null;
1112 }
1213
1314 public function getDescription() {
14 - return wfMessage( 'ac-landing-page-title' )->plain();
 15+ return wfMessage( $this->pageTitle )->plain();
1516 }
1617
1718 public function execute( $par ) {
@@ -28,7 +29,8 @@
2930 return;
3031 }
3132
32 - $wgOut->setPageTitle( wfMsg('ac-landing-page-title' ) );
 33+ $this->pageTitle = wfMsg( 'ac-landing-page-title', $title );
 34+ $wgOut->setPageTitle( $this->pageTitle );
3335 $wgOut->setRobotPolicy( 'noindex,nofollow' );
3436 $wgOut->addModules( 'ext.articleCreation.core' );
3537 $wgOut->addModules( 'ext.articleCreation.user' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r112928pageTitle is the actual title, not a message key....raindrift23:50, 2 March 2012

Comments

#Comment by Bsitu (talk | contribs)   22:12, 2 March 2012

    return wfMessage( $this->pageTitle )->plain();

Looks like $this->pageTitle is not a message key, shouldn't this just be return $this->pageTitle

#Comment by Siebrand (talk | contribs)   22:16, 2 March 2012

In special pages, this usually is a message key with the link description on Special:SpecialPages and the special page title.

Not sure if it may need lc( title ), though.

#Comment by Raindrift (talk | contribs)   23:51, 2 March 2012

Thanks for catching this. Fixed in r112928.

Status & tagging log