jenkins-bot has submitted this change and it was merged.

Change subject: Improve help text for list=alllinks and alltransclusions
......................................................................


Improve help text for list=alllinks and alltransclusions

This patch set changed some
- "link titles" to "linked titles"
- "transclusion titles" to "transcluded titles"

Change-Id: If536368e95ca5e160d8a69e832e67e3248b787fd
---
M includes/api/ApiQueryAllLinks.php
1 file changed, 29 insertions(+), 26 deletions(-)

Approvals:
  Anomie: Looks good to me, but someone else must approve
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQueryAllLinks.php 
b/includes/api/ApiQueryAllLinks.php
index e355f8b..3744e3c 100644
--- a/includes/api/ApiQueryAllLinks.php
+++ b/includes/api/ApiQueryAllLinks.php
@@ -40,8 +40,8 @@
                                $this->dfltNamespace = NS_MAIN;
                                $this->indexTag = 'l';
                                $this->description = 'Enumerate all links that 
point to a given namespace';
-                               $this->descriptionLink = 'link';
-                               $this->descriptionLinked = 'linked';
+                               $this->descriptionWhat = 'link';
+                               $this->descriptionTargets = 'linked titles';
                                $this->descriptionLinking = 'linking';
                                break;
                        case 'alltransclusions':
@@ -51,8 +51,8 @@
                                $this->dfltNamespace = NS_TEMPLATE;
                                $this->indexTag = 't';
                                $this->description = 'List all transclusions 
(pages embedded using {{x}}), including non-existing';
-                               $this->descriptionLink = 'transclusion';
-                               $this->descriptionLinked = 'transcluded';
+                               $this->descriptionWhat = 'transclusion';
+                               $this->descriptionTargets = 'transcluded 
titles';
                                $this->descriptionLinking = 'transcluding';
                                break;
                        default:
@@ -90,7 +90,7 @@
                if ( $params['unique'] ) {
                        if ( $fld_ids ) {
                                $this->dieUsage(
-                                       "{$this->getModuleName()} cannot return 
corresponding page ids in unique {$this->descriptionLink}s mode",
+                                       "{$this->getModuleName()} cannot return 
corresponding page ids in unique {$this->descriptionWhat}s mode",
                                        'params' );
                        }
                        $this->addOption( 'DISTINCT' );
@@ -232,23 +232,24 @@
 
        public function getParamDescription() {
                $p = $this->getModulePrefix();
-               $link = $this->descriptionLink;
+               $what = $this->descriptionWhat;
+               $targets = $this->descriptionTargets;
                $linking = $this->descriptionLinking;
                return array(
-                       'from' => "The title of the $link to start enumerating 
from",
-                       'to' => "The title of the $link to stop enumerating at",
-                       'prefix' => "Search for all $link titles that begin 
with this value",
+                       'from' => "The title of the $what to start enumerating 
from",
+                       'to' => "The title of the $what to stop enumerating at",
+                       'prefix' => "Search for all $targets that begin with 
this value",
                        'unique' => array(
-                                       "Only show distinct $link titles. 
Cannot be used with {$p}prop=ids.",
-                                       'When used as a generator, yields 
target pages instead of source pages.',
+                               "Only show distinct $targets. Cannot be used 
with {$p}prop=ids.",
+                               'When used as a generator, yields target pages 
instead of source pages.',
                        ),
                        'prop' => array(
                                'What pieces of information to include',
                                " ids    - Adds the pageid of the $linking page 
(Cannot be used with {$p}unique)",
-                               " title  - Adds the title of the $link",
+                               " title  - Adds the title of the $what",
                        ),
                        'namespace' => 'The namespace to enumerate',
-                       'limit' => "How many total items to return",
+                       'limit' => 'How many total items to return',
                        'continue' => 'When more results are available, use 
this to continue',
                        'dir' => 'The direction in which to list',
                );
@@ -272,29 +273,31 @@
 
        public function getPossibleErrors() {
                $m = $this->getModuleName();
-               $link = $this->descriptionLink;
+               $what = $this->descriptionWhat;
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => "{$m} cannot 
return corresponding page ids in unique {$link}s mode" ),
+                       array( 'code' => 'params', 'info' => "{$m} cannot 
return corresponding page ids in unique {$what}s mode" ),
                ) );
        }
 
        public function getExamples() {
                $p = $this->getModulePrefix();
-               $link = $this->descriptionLink;
-               $linked = $this->descriptionLinked;
+               $name = $this->getModuleName();
+               $what = $this->descriptionWhat;
+               $targets = $this->descriptionTargets;
                return array(
-                       
"api.php?action=query&list=all{$link}s&{$p}from=B&{$p}prop=ids|title"
-                                       => "List $linked titles with page ids 
they are from, including missing ones. Start at B",
-                       
"api.php?action=query&list=all{$link}s&{$p}unique=&{$p}from=B"
-                                       => "List unique $linked titles",
-                       
"api.php?action=query&generator=all{$link}s&g{$p}unique=&g{$p}from=B"
-                                       => "Gets all $link targets, marking the 
missing ones",
-                       "api.php?action=query&generator=all{$link}s&g{$p}from=B"
-                                       => "Gets pages containing the {$link}s",
+                       
"api.php?action=query&list={$name}&{$p}from=B&{$p}prop=ids|title"
+                                       => "List $targets with page ids they 
are from, including missing ones. Start at B",
+                       
"api.php?action=query&list={$name}&{$p}unique=&{$p}from=B"
+                                       => "List unique $targets",
+                       
"api.php?action=query&generator={$name}&g{$p}unique=&g{$p}from=B"
+                                       => "Gets all $targets, marking the 
missing ones",
+                       "api.php?action=query&generator={$name}&g{$p}from=B"
+                                       => "Gets pages containing the {$what}s",
                );
        }
 
        public function getHelpUrls() {
-               return 
"https://www.mediawiki.org/wiki/API:All{$this->descriptionLink}s";
+               $name = ucfirst( $this->getModuleName() );
+               return "https://www.mediawiki.org/wiki/API:{$name}";;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/69950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If536368e95ca5e160d8a69e832e67e3248b787fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to