r108847 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108846‎ | r108847 | r108848 >
Date:21:11, 13 January 2012
Author:siebrand
Status:resolved
Tags:
Comment:
Change usage of quotes in API messages from ``x'' to "x".
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiDisabled.php (modified) (history)
  • /trunk/phase3/includes/api/ApiLogin.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryDisabled.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImages.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLinks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryLinks.php
@@ -99,7 +99,7 @@
100100 foreach ( $params[$this->titlesParam] as $t ) {
101101 $title = Title::newFromText( $t );
102102 if ( !$title ) {
103 - $this->setWarning( "``$t'' is not a valid title" );
 103+ $this->setWarning( "\"$t\" is not a valid title" );
104104 } else {
105105 $lb->addObj( $title );
106106 }
Index: trunk/phase3/includes/api/ApiDisabled.php
@@ -41,7 +41,7 @@
4242 }
4343
4444 public function execute() {
45 - $this->dieUsage( "The ``{$this->getModuleName()}'' module has been disabled.", 'moduledisabled' );
 45+ $this->dieUsage( "The \"{$this->getModuleName()}\" module has been disabled.", 'moduledisabled' );
4646 }
4747
4848 public function isReadMode() {
Index: trunk/phase3/includes/api/ApiLogin.php
@@ -200,7 +200,7 @@
201201 array( 'code' => 'NotExists', 'info' => ' The username you provided doesn\'t exist' ),
202202 array( 'code' => 'EmptyPass', 'info' => ' You didn\'t set the lgpassword parameter or you left it empty' ),
203203 array( 'code' => 'WrongPass', 'info' => ' The password you provided is incorrect' ),
204 - array( 'code' => 'WrongPluginPass', 'info' => 'Same as `WrongPass", returned when an authentication plugin rather than MediaWiki itself rejected the password' ),
 204+ array( 'code' => 'WrongPluginPass', 'info' => 'Same as "WrongPass", returned when an authentication plugin rather than MediaWiki itself rejected the password' ),
205205 array( 'code' => 'CreateBlocked', 'info' => 'The wiki tried to automatically create a new account for you, but your IP address has been blocked from account creation' ),
206206 array( 'code' => 'Throttled', 'info' => 'You\'ve logged in too many times in a short time' ),
207207 array( 'code' => 'Blocked', 'info' => 'User is blocked' ),
Index: trunk/phase3/includes/api/ApiQueryDisabled.php
@@ -41,7 +41,7 @@
4242 }
4343
4444 public function execute() {
45 - $this->setWarning( "The ``{$this->getModuleName()}'' module has been disabled." );
 45+ $this->setWarning( "The \"{$this->getModuleName()}\" module has been disabled." );
4646 }
4747
4848 public function getAllowedParams() {
Index: trunk/phase3/includes/api/ApiBase.php
@@ -1090,17 +1090,17 @@
10911091 */
10921092 public static $messageMap = array(
10931093 // This one MUST be present, or dieUsageMsg() will recurse infinitely
1094 - 'unknownerror' => array( 'code' => 'unknownerror', 'info' => "Unknown error: ``\$1''" ),
 1094+ 'unknownerror' => array( 'code' => 'unknownerror', 'info' => "Unknown error: \"\$1\"" ),
10951095 'unknownerror-nocode' => array( 'code' => 'unknownerror', 'info' => 'Unknown error' ),
10961096
10971097 // Messages from Title::getUserPermissionsErrors()
10981098 'ns-specialprotected' => array( 'code' => 'unsupportednamespace', 'info' => "Pages in the Special namespace can't be edited" ),
10991099 'protectedinterface' => array( 'code' => 'protectednamespace-interface', 'info' => "You're not allowed to edit interface messages" ),
1100 - 'namespaceprotected' => array( 'code' => 'protectednamespace', 'info' => "You're not allowed to edit pages in the ``\$1'' namespace" ),
 1100+ 'namespaceprotected' => array( 'code' => 'protectednamespace', 'info' => "You're not allowed to edit pages in the \"\$1\" namespace" ),
11011101 'customcssprotected' => array( 'code' => 'customcssprotected', 'info' => "You're not allowed to edit custom CSS pages" ),
11021102 'customjsprotected' => array( 'code' => 'customjsprotected', 'info' => "You're not allowed to edit custom JavaScript pages" ),
11031103 'cascadeprotected' => array( 'code' => 'cascadeprotected', 'info' => "The page you're trying to edit is protected because it's included in a cascade-protected page" ),
1104 - 'protectedpagetext' => array( 'code' => 'protectedpage', 'info' => "The ``\$1'' right is required to edit this page" ),
 1104+ 'protectedpagetext' => array( 'code' => 'protectedpage', 'info' => "The \"\$1'' right is required to edit this page" ),
11051105 'protect-cantedit' => array( 'code' => 'cantedit', 'info' => "You can't protect this page because you can't edit it" ),
11061106 'badaccess-group0' => array( 'code' => 'permissiondenied', 'info' => "Permission denied" ), // Generic permission denied message
11071107 'badaccess-groups' => array( 'code' => 'permissiondenied', 'info' => "Permission denied" ),
@@ -1119,7 +1119,7 @@
11201120 'cantrollback' => array( 'code' => 'onlyauthor', 'info' => "The page you tried to rollback only has one author" ),
11211121 'readonlytext' => array( 'code' => 'readonly', 'info' => "The wiki is currently in read-only mode" ),
11221122 'sessionfailure' => array( 'code' => 'badtoken', 'info' => "Invalid token" ),
1123 - 'cannotdelete' => array( 'code' => 'cantdelete', 'info' => "Couldn't delete ``\$1''. Maybe it was deleted already by someone else" ),
 1123+ 'cannotdelete' => array( 'code' => 'cantdelete', 'info' => "Couldn't delete \"\$1\". Maybe it was deleted already by someone else" ),
11241124 'notanarticle' => array( 'code' => 'missingtitle', 'info' => "The page you requested doesn't exist" ),
11251125 'selfmove' => array( 'code' => 'selfmove', 'info' => "Can't move a page to itself" ),
11261126 'immobile_namespace' => array( 'code' => 'immobilenamespace', 'info' => "You tried to move pages from or to a namespace that is protected from moving" ),
@@ -1137,7 +1137,7 @@
11381138 'badipaddress' => array( 'code' => 'invalidip', 'info' => "Invalid IP address specified" ),
11391139 'ipb_expiry_invalid' => array( 'code' => 'invalidexpiry', 'info' => "Invalid expiry time" ),
11401140 'ipb_already_blocked' => array( 'code' => 'alreadyblocked', 'info' => "The user you tried to block was already blocked" ),
1141 - 'ipb_blocked_as_range' => array( 'code' => 'blockedasrange', 'info' => "IP address ``\$1'' was blocked as part of range ``\$2''. You can't unblock the IP invidually, but you can unblock the range as a whole." ),
 1141+ 'ipb_blocked_as_range' => array( 'code' => 'blockedasrange', 'info' => "IP address \"\$1\" was blocked as part of range \"\$2\". You can't unblock the IP invidually, but you can unblock the range as a whole." ),
11421142 'ipb_cant_unblock' => array( 'code' => 'cantunblock', 'info' => "The block you specified was not found. It may have been unblocked already" ),
11431143 'mailnologin' => array( 'code' => 'cantsend', 'info' => "You are not logged in, you do not have a confirmed e-mail address, or you are not allowed to send e-mail to other users, so you cannot send e-mail" ),
11441144 'ipbblocked' => array( 'code' => 'ipbblocked', 'info' => 'You cannot block or unblock users while you are yourself blocked' ),
@@ -1151,9 +1151,9 @@
11521152 'delete-toobig' => array( 'code' => 'bigdelete', 'info' => "You can't delete this page because it has more than \$1 revisions" ),
11531153 'movenotallowedfile' => array( 'code' => 'cantmovefile', 'info' => "You don't have permission to move files" ),
11541154 'userrights-no-interwiki' => array( 'code' => 'nointerwikiuserrights', 'info' => "You don't have permission to change user rights on other wikis" ),
1155 - 'userrights-nodatabase' => array( 'code' => 'nosuchdatabase', 'info' => "Database ``\$1'' does not exist or is not local" ),
1156 - 'nouserspecified' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ),
1157 - 'noname' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ),
 1155+ 'userrights-nodatabase' => array( 'code' => 'nosuchdatabase', 'info' => "Database \"\$1\" does not exist or is not local" ),
 1156+ 'nouserspecified' => array( 'code' => 'invaliduser', 'info' => "Invalid username \"\$1\"" ),
 1157+ 'noname' => array( 'code' => 'invaliduser', 'info' => "Invalid username \"\$1\"" ),
11581158 'summaryrequired' => array( 'code' => 'summaryrequired', 'info' => 'Summary required' ),
11591159
11601160 // API-specific messages
@@ -1161,13 +1161,13 @@
11621162 'writedisabled' => array( 'code' => 'noapiwrite', 'info' => "Editing of this wiki through the API is disabled. Make sure the \$wgEnableWriteAPI=true; statement is included in the wiki's LocalSettings.php file" ),
11631163 'writerequired' => array( 'code' => 'writeapidenied', 'info' => "You're not allowed to edit this wiki through the API" ),
11641164 'missingparam' => array( 'code' => 'no$1', 'info' => "The \$1 parameter must be set" ),
1165 - 'invalidtitle' => array( 'code' => 'invalidtitle', 'info' => "Bad title ``\$1''" ),
 1165+ 'invalidtitle' => array( 'code' => 'invalidtitle', 'info' => "Bad title \"\$1\"" ),
11661166 'nosuchpageid' => array( 'code' => 'nosuchpageid', 'info' => "There is no page with ID \$1" ),
11671167 'nosuchrevid' => array( 'code' => 'nosuchrevid', 'info' => "There is no revision with ID \$1" ),
1168 - 'nosuchuser' => array( 'code' => 'nosuchuser', 'info' => "User ``\$1'' doesn't exist" ),
1169 - 'invaliduser' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ),
1170 - 'invalidexpiry' => array( 'code' => 'invalidexpiry', 'info' => "Invalid expiry time ``\$1''" ),
1171 - 'pastexpiry' => array( 'code' => 'pastexpiry', 'info' => "Expiry time ``\$1'' is in the past" ),
 1168+ 'nosuchuser' => array( 'code' => 'nosuchuser', 'info' => "User \"\$1\" doesn't exist" ),
 1169+ 'invaliduser' => array( 'code' => 'invaliduser', 'info' => "Invalid username \"\$1\"" ),
 1170+ 'invalidexpiry' => array( 'code' => 'invalidexpiry', 'info' => "Invalid expiry time \"\$1\"" ),
 1171+ 'pastexpiry' => array( 'code' => 'pastexpiry', 'info' => "Expiry time \"\$1\" is in the past" ),
11721172 'create-titleexists' => array( 'code' => 'create-titleexists', 'info' => "Existing titles can't be protected with 'create'" ),
11731173 'missingtitle-createonly' => array( 'code' => 'missingtitle-createonly', 'info' => "Missing titles can only be protected with 'create'" ),
11741174 'cantblock' => array( 'code' => 'cantblock', 'info' => "You don't have permission to block users" ),
@@ -1180,9 +1180,9 @@
11811181 'permdenied-undelete' => array( 'code' => 'permissiondenied', 'info' => "You don't have permission to restore deleted revisions" ),
11821182 'createonly-exists' => array( 'code' => 'articleexists', 'info' => "The article you tried to create has been created already" ),
11831183 'nocreate-missing' => array( 'code' => 'missingtitle', 'info' => "The article you tried to edit doesn't exist" ),
1184 - 'nosuchrcid' => array( 'code' => 'nosuchrcid', 'info' => "There is no change with rcid ``\$1''" ),
1185 - 'protect-invalidaction' => array( 'code' => 'protect-invalidaction', 'info' => "Invalid protection type ``\$1''" ),
1186 - 'protect-invalidlevel' => array( 'code' => 'protect-invalidlevel', 'info' => "Invalid protection level ``\$1''" ),
 1184+ 'nosuchrcid' => array( 'code' => 'nosuchrcid', 'info' => "There is no change with rcid \"\$1\"" ),
 1185+ 'protect-invalidaction' => array( 'code' => 'protect-invalidaction', 'info' => "Invalid protection type \"\$1\"" ),
 1186+ 'protect-invalidlevel' => array( 'code' => 'protect-invalidlevel', 'info' => "Invalid protection level \"\$1\"" ),
11871187 'toofewexpiries' => array( 'code' => 'toofewexpiries', 'info' => "\$1 expiry timestamps were provided where \$2 were needed" ),
11881188 'cantimport' => array( 'code' => 'cantimport', 'info' => "You don't have permission to import pages" ),
11891189 'cantimport-upload' => array( 'code' => 'cantimport-upload', 'info' => "You don't have permission to import uploaded pages" ),
@@ -1194,7 +1194,7 @@
11951195 'importcantopen' => array( 'code' => 'cantopenfile', 'info' => "Couldn't open the uploaded file" ),
11961196 'import-noarticle' => array( 'code' => 'badinterwiki', 'info' => 'Invalid interwiki title specified' ),
11971197 'importbadinterwiki' => array( 'code' => 'badinterwiki', 'info' => 'Invalid interwiki title specified' ),
1198 - 'import-unknownerror' => array( 'code' => 'import-unknownerror', 'info' => "Unknown error on import: ``\$1''" ),
 1198+ 'import-unknownerror' => array( 'code' => 'import-unknownerror', 'info' => "Unknown error on import: \"\$1\"" ),
11991199 'cantoverwrite-sharedfile' => array( 'code' => 'cantoverwrite-sharedfile', 'info' => 'The target file exists on a shared repository and you do not have permission to override it' ),
12001200 'sharedfile-exists' => array( 'code' => 'fileexists-sharedrepo-perm', 'info' => 'The target file exists on a shared repository. Use the ignorewarnings parameter to override it.' ),
12011201 'mustbeposted' => array( 'code' => 'mustbeposted', 'info' => "The \$1 module requires a POST request" ),
@@ -1206,7 +1206,7 @@
12071207 // ApiEditPage messages
12081208 'noimageredirect-anon' => array( 'code' => 'noimageredirect-anon', 'info' => "Anonymous users can't create image redirects" ),
12091209 'noimageredirect-logged' => array( 'code' => 'noimageredirect', 'info' => "You don't have permission to create image redirects" ),
1210 - 'spamdetected' => array( 'code' => 'spamdetected', 'info' => "Your edit was refused because it contained a spam fragment: ``\$1''" ),
 1210+ 'spamdetected' => array( 'code' => 'spamdetected', 'info' => "Your edit was refused because it contained a spam fragment: \"\$1\"" ),
12111211 'filtered' => array( 'code' => 'filtered', 'info' => "The filter callback function refused your edit" ),
12121212 'contenttoobig' => array( 'code' => 'contenttoobig', 'info' => "The content you supplied exceeds the article size limit of \$1 kilobytes" ),
12131213 'noedit-anon' => array( 'code' => 'noedit-anon', 'info' => "Anonymous users can't edit pages" ),
@@ -1217,7 +1217,7 @@
12181218 'hashcheckfailed' => array( 'code' => 'badmd5', 'info' => "The supplied MD5 hash was incorrect" ),
12191219 'missingtext' => array( 'code' => 'notext', 'info' => "One of the text, appendtext, prependtext and undo parameters must be set" ),
12201220 'emptynewsection' => array( 'code' => 'emptynewsection', 'info' => 'Creating empty new sections is not possible.' ),
1221 - 'revwrongpage' => array( 'code' => 'revwrongpage', 'info' => "r\$1 is not a revision of ``\$2''" ),
 1221+ 'revwrongpage' => array( 'code' => 'revwrongpage', 'info' => "r\$1 is not a revision of \"\$2\"" ),
12221222 'undo-failure' => array( 'code' => 'undofailure', 'info' => 'Undo failed due to conflicting intermediate edits' ),
12231223
12241224 // Messages from WikiPage::doEit()
Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -75,7 +75,7 @@
7676 foreach ( $params['categories'] as $cat ) {
7777 $title = Title::newFromText( $cat );
7878 if ( !$title || $title->getNamespace() != NS_CATEGORY ) {
79 - $this->setWarning( "``$cat'' is not a category" );
 79+ $this->setWarning( "\"$cat\" is not a category" );
8080 } else {
8181 $cats[] = $title->getDBkey();
8282 }
Index: trunk/phase3/includes/api/ApiQueryImages.php
@@ -91,7 +91,7 @@
9292 foreach ( $params['images'] as $img ) {
9393 $title = Title::newFromText( $img );
9494 if ( !$title || $title->getNamespace() != NS_FILE ) {
95 - $this->setWarning( "``$img'' is not a file" );
 95+ $this->setWarning( "\"$img\" is not a file" );
9696 } else {
9797 $images[] = $title->getDBkey();
9898 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r108849Ping r108847, missed one half quotenikerabbit21:19, 13 January 2012

Status & tagging log