Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/171989
Change subject: API: Allow for documenting individual values of 'prop'
parameters
......................................................................
API: Allow for documenting individual values of 'prop' parameters
There are cases where the list of values for a 'prop' parameter may be
manipulated by a subclass or by a hook function of some sort. Rather
than requiring the subclass/hook to completely replace a monolithic i18n
message, let's add the possibility of separate messages for each value
in the list.
Change-Id: I0bb061c62ebeef125062460e26306c88390f7b31
---
M includes/Message.php
M includes/api/ApiBase.php
M includes/api/ApiHelp.php
M includes/api/ApiParamInfo.php
M includes/api/ApiQueryAllImages.php
M includes/api/ApiQueryImageInfo.php
M includes/api/ApiQueryInfo.php
M includes/api/ApiQueryStashImageInfo.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
10 files changed, 233 insertions(+), 40 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/89/171989/1
diff --git a/includes/Message.php b/includes/Message.php
index 93a37cb..8339188 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -1165,3 +1165,58 @@
}
}
+
+/**
+ * Variant of the Message class.
+ *
+ * This class will wrap the underlying message in some other text, typically
+ * some layout wikitext or HTML that shouldn't be included in the i18n.
+ *
+ * All other functionality (parsing, escaping, etc.)
+ * is preserved.
+ *
+ * @since 1.25
+ */
+class WrappedMessage extends Message {
+
+ protected $wrapper;
+
+ /**
+ * @see Message::__construct
+ *
+ * @param string $wrapper Wrapper text. '$1' is replaced with the
actual message.
+ * @param string $text Message to use.
+ * @param array $params Parameters for the message.
+ * @throws InvalidArgumentException
+ */
+ public function __construct( $wrapper, $text, $params = array() ) {
+ if ( !is_string( $wrapper ) ) {
+ throw new InvalidArgumentException( '$wrapper must be a
string' );
+ }
+
+ parent::__construct( $text, $params );
+ $this->wrapper = $wrapper;
+ }
+
+ /**
+ * Fetch the wrapping text
+ *
+ * @return string
+ */
+ public function getWrapText() {
+ return $this->wrapper;
+ }
+
+ /**
+ * Fetch the message.
+ *
+ * @return string
+ */
+ public function fetchMessage() {
+ if ( $this->message === null ) {
+ $this->message = str_replace( '$1',
parent::fetchMessage(), $this->wrapper );
+ }
+ return $this->message;
+ }
+
+}
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 3f84f2a..f2e577f 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -66,13 +66,11 @@
const PARAM_RANGE_ENFORCE = 9;
/// @since 1.25
// Specify an alternative i18n message for this help parameter.
- // Value can be a string key, an array giving key and parameters, or a
- // Message object.
+ // Value is $msg for ApiBase::makeMessage()
const PARAM_HELP_MSG = 10;
/// @since 1.25
// Specify additional i18n messages to append to the normal message.
Value
- // is an array of any of strings giving the message key, arrays giving
key and
- // parameters, or Message objects.
+ // is an array of $msg for ApiBase::makeMessage()
const PARAM_HELP_MSG_APPEND = 11;
/// @since 1.25
// Specify additional information tags for the parameter. Value is an
array
@@ -82,9 +80,14 @@
// comma-joined list of values, $3 = module prefix.
const PARAM_HELP_MSG_INFO = 12;
/// @since 1.25
- // When PARAM_DFLT is an array, this may be an array mapping those
values
+ // When PARAM_TYPE is an array, this may be an array mapping those
values
// to page titles which will be linked in the help.
const PARAM_VALUE_LINKS = 13;
+ /// @since 1.25
+ // When PARAM_TYPE is an array, this is an array mapping those values to
+ // $msg for ApiBase::makeMessage(). Any value not having a mapping will
use
+ // apihelp-{$path}-paramvalue-{$param}-{$value} is used.
+ const PARAM_HELP_MSG_PER_VALUE = 14;
const LIMIT_BIG1 = 500; // Fast query, std user limit
const LIMIT_BIG2 = 5000; // Fast query, bot/sysop limit
@@ -2013,6 +2016,10 @@
* @return array Keys are parameter names, values are arrays of Message
objects
*/
public function getFinalParamDescription() {
+ $prefix = $this->getModulePrefix();
+ $name = $this->getModuleName();
+ $path = $this->getModulePath();
+
$desc = $this->getParamDescription();
wfRunHooks( 'APIGetParamDescription', array( &$this, &$desc ) );
@@ -2043,22 +2050,52 @@
if ( isset( $settings[ApiBase::PARAM_HELP_MSG] ) ) {
$msg = $settings[ApiBase::PARAM_HELP_MSG];
} else {
- $msg = $this->msg(
"apihelp-{$this->getModulePath()}-param-{$param}" );
+ $msg = $this->msg(
"apihelp-{$path}-param-{$param}" );
if ( !$msg->exists() ) {
$msg = $this->msg(
'api-help-fallback-parameter', $d );
}
}
- $msg = ApiBase::makeMessage( $msg, $this->getContext(),
array(
- $this->getModulePrefix(),
- $param,
- $this->getModuleName(),
- $this->getModulePath(),
- ) );
+ $msg = ApiBase::makeMessage( $msg, $this->getContext(),
+ array( $prefix, $param, $name, $path ) );
if ( !$msg ) {
$this->dieDebug( __METHOD__,
'Value in ApiBase::PARAM_HELP_MSG is
not valid' );
}
$msgs[$param] = array( $msg );
+
+ if ( isset(
$settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
+ if ( !is_array(
$settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
+ $this->dieDebug( __METHOD__,
+
'ApiBase::PARAM_HELP_MSG_PER_VALUE is not valid' );
+ }
+ if ( !is_array( $settings[ApiBase::PARAM_TYPE]
) ) {
+ $this->dieDebug( __METHOD__,
+
'ApiBase::PARAM_HELP_MSG_PER_VALUE may only be used when ' .
+ 'ApiBase::PARAM_TYPE is an
array' );
+ }
+
+ $valueMsgs =
$settings[ApiBase::PARAM_HELP_MSG_PER_VALUE];
+ foreach ( $settings[ApiBase::PARAM_TYPE] as
$value ) {
+ if ( isset( $valueMsgs[$value] ) ) {
+ $msg = $valueMsgs[$value];
+ } else {
+ $msg =
"apihelp-{$path}-paramvalue-{$param}-{$value}";
+ }
+ $m = ApiBase::makeMessage( $msg,
$this->getContext(),
+ array( $prefix, $param, $name,
$path, $value ) );
+ if ( $m ) {
+ $m = new WrappedMessage(
+ ";$value:$1",
+ array( $m->getKey(),
'api-help-param-no-description' ),
+ $m->getParams()
+ );
+ $msgs[$param][] =
$m->setContext( $this->getContext() );
+ } else {
+ $this->dieDebug( __METHOD__,
+ "Value in
ApiBase::PARAM_HELP_MSG_PER_VALUE for $value is not valid" );
+ }
+ }
+ }
if ( isset( $settings[ApiBase::PARAM_HELP_MSG_APPEND] )
) {
if ( !is_array(
$settings[ApiBase::PARAM_HELP_MSG_APPEND] ) ) {
@@ -2066,12 +2103,8 @@
'Value for
ApiBase::PARAM_HELP_MSG_APPEND is not an array' );
}
foreach (
$settings[ApiBase::PARAM_HELP_MSG_APPEND] as $m ) {
- $m = ApiBase::makeMessage( $m,
$this->getContext(), array(
- $this->getModulePrefix(),
- $param,
- $this->getModuleName(),
- $this->getModulePath(),
- ) );
+ $m = ApiBase::makeMessage( $m,
$this->getContext(),
+ array( $prefix, $param, $name,
$path ) );
if ( $m ) {
$msgs[$param][] = $m;
} else {
diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php
index 5d46a07..9b0d81c 100644
--- a/includes/api/ApiHelp.php
+++ b/includes/api/ApiHelp.php
@@ -546,10 +546,10 @@
}
if ( $description ) {
- $help['parameters'] .=
Html::openElement( 'dd',
- array( 'class' =>
'description' ) );
- $help['parameters'] .= join(
'', $description );
- $help['parameters'] .=
Html::closeElement( 'dd' );
+ $description = join( '',
$description );
+ $description = preg_replace(
'!\s*</([oud]l)>\s*<\1>\s*!', "\n", $description );
+ $help['parameters'] .=
Html::rawElement( 'dd',
+ array( 'class' =>
'description' ), $description );
}
foreach ( $info as $i ) {
diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php
index 17773a7..7defce6 100644
--- a/includes/api/ApiParamInfo.php
+++ b/includes/api/ApiParamInfo.php
@@ -129,8 +129,9 @@
* @param array $res Result array
* @param string $key Result key
* @param Message[] $msgs
+ * @param boolean $joinLists
*/
- protected function formatHelpMessages( array &$res, $key, array $msgs )
{
+ protected function formatHelpMessages( array &$res, $key, array $msgs,
$joinLists = false ) {
switch ( $this->helpFormat ) {
case 'none':
break;
@@ -141,6 +142,9 @@
$ret[] = $m->setContext( $this->context
)->text();
}
$res[$key] = join( "\n\n", $ret );
+ if ( $joinLists ) {
+ $res[$key] = preg_replace(
'!^(([*#:;])[^\n]*)\n\n(?=\2)!m', "$1\n", $res[$key] );
+ }
break;
case 'html':
@@ -148,16 +152,24 @@
foreach ( $msgs as $m ) {
$ret[] = $m->setContext( $this->context
)->parseAsBlock();
}
- $res[$key] = join( "\n", $ret );
+ $ret = join( "\n", $ret );
+ if ( $joinLists ) {
+ $ret = preg_replace(
'!\s*</([oud]l)>\s*<\1>\s*!', "\n", $ret );
+ }
+ $res[$key] = $ret;
break;
case 'raw':
$res[$key] = array();
foreach ( $msgs as $m ) {
- $res[$key][] = array(
+ $a = array(
'key' => $m->getKey(),
'params' => $m->getParams(),
);
+ if ( $m instanceof WrappedMessage ) {
+ $a['wrapper'] =
$m->getWrapText();
+ }
+ $res[$key][] = $a;
}
$this->getResult()->setIndexedTagName(
$res[$key], 'msg' );
break;
@@ -232,7 +244,7 @@
'name' => $name
);
if ( isset( $paramDesc[$name] ) ) {
- $this->formatHelpMessages( $item,
'description', $paramDesc[$name] );
+ $this->formatHelpMessages( $item,
'description', $paramDesc[$name], true );
}
if ( !empty( $settings[ApiBase::PARAM_REQUIRED] ) ) {
diff --git a/includes/api/ApiQueryAllImages.php
b/includes/api/ApiQueryAllImages.php
index 725b782..20e9f5e 100644
--- a/includes/api/ApiQueryAllImages.php
+++ b/includes/api/ApiQueryAllImages.php
@@ -333,7 +333,9 @@
'prop' => array(
ApiBase::PARAM_TYPE =>
ApiQueryImageInfo::getPropertyNames( $this->propertyFilter ),
ApiBase::PARAM_DFLT => 'timestamp|url',
- ApiBase::PARAM_ISMULTI => true
+ ApiBase::PARAM_ISMULTI => true,
+ ApiBase::PARAM_HELP_MSG =>
'apihelp-query+imageinfo-param-prop',
+ ApiBase::PARAM_HELP_MSG_PER_VALUE =>
ApiQueryImageInfo::getPropertyMessages( $this->propertyFilter ),
),
'prefix' => null,
'minsize' => array(
diff --git a/includes/api/ApiQueryImageInfo.php
b/includes/api/ApiQueryImageInfo.php
index cfd06f1..c4ca5d6 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -632,7 +632,8 @@
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_DFLT => 'timestamp|user',
- ApiBase::PARAM_TYPE => self::getPropertyNames()
+ ApiBase::PARAM_TYPE => self::getPropertyNames(),
+ ApiBase::PARAM_HELP_MSG_PER_VALUE =>
self::getPropertyMessages(),
),
'limit' => array(
ApiBase::PARAM_TYPE => 'limit',
@@ -690,11 +691,43 @@
* Returns all possible parameters to iiprop
*
* @param array $filter List of properties to filter out
- *
* @return array
*/
public static function getPropertyNames( $filter = array() ) {
- return array_diff( array_keys( self::getProperties() ), $filter
);
+ return array_keys( self::getPropertyMessages( $filter ) );
+ }
+
+ /**
+ * Returns messages for all possible parameters to iiprop
+ *
+ * @param array $filter List of properties to filter out
+ * @return array
+ */
+ public static function getPropertyMessages( $filter = array() ) {
+ return array_diff_key(
+ array(
+ 'timestamp' =>
'apihelp-query+imageinfo-paramvalue-prop-timestamp',
+ 'user' =>
'apihelp-query+imageinfo-paramvalue-prop-user',
+ 'userid' =>
'apihelp-query+imageinfo-paramvalue-prop-userid',
+ 'comment' =>
'apihelp-query+imageinfo-paramvalue-prop-comment',
+ 'parsedcomment' =>
'apihelp-query+imageinfo-paramvalue-prop-parsedcomment',
+ 'canonicaltitle' =>
'apihelp-query+imageinfo-paramvalue-prop-canonicaltitle',
+ 'url' =>
'apihelp-query+imageinfo-paramvalue-prop-url',
+ 'size' =>
'apihelp-query+imageinfo-paramvalue-prop-size',
+ 'dimensions' =>
'apihelp-query+imageinfo-paramvalue-prop-dimensions',
+ 'sha1' =>
'apihelp-query+imageinfo-paramvalue-prop-sha1',
+ 'mime' =>
'apihelp-query+imageinfo-paramvalue-prop-mime',
+ 'thumbmime' =>
'apihelp-query+imageinfo-paramvalue-prop-thumbmime',
+ 'mediatype' =>
'apihelp-query+imageinfo-paramvalue-prop-mediatype',
+ 'metadata' =>
'apihelp-query+imageinfo-paramvalue-prop-metadata',
+ 'commonmetadata' =>
'apihelp-query+imageinfo-paramvalue-prop-commonmetadata',
+ 'extmetadata' =>
'apihelp-query+imageinfo-paramvalue-prop-extmetadata',
+ 'archivename' =>
'apihelp-query+imageinfo-paramvalue-prop-archivename',
+ 'bitdepth' =>
'apihelp-query+imageinfo-paramvalue-prop-bitdepth',
+ 'uploadwarning' =>
'apihelp-query+imageinfo-paramvalue-prop-uploadwarning',
+ ),
+ array_flip( $filter )
+ );
}
/**
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 5e61ed1..14495ca 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -811,7 +811,9 @@
'displaytitle',
// If you add more properties here,
please consider whether they
// need to be added to getCacheMode()
- ) ),
+ ),
+ ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
+ ),
'token' => array(
ApiBase::PARAM_DEPRECATED => true,
ApiBase::PARAM_DFLT => null,
diff --git a/includes/api/ApiQueryStashImageInfo.php
b/includes/api/ApiQueryStashImageInfo.php
index be6f669..1debb2e 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -90,7 +90,9 @@
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_DFLT => 'timestamp|url',
- ApiBase::PARAM_TYPE => self::getPropertyNames(
$this->propertyFilter )
+ ApiBase::PARAM_TYPE => self::getPropertyNames(
$this->propertyFilter ),
+ ApiBase::PARAM_HELP_MSG =>
'apihelp-query+imageinfo-param-prop',
+ ApiBase::PARAM_HELP_MSG_PER_VALUE =>
self::getPropertyMessages( $this->propertyFilter )
),
'urlwidth' => array(
ApiBase::PARAM_TYPE => 'integer',
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 4fbfb40..b5a0ca6 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -356,7 +356,6 @@
"apihelp-query+allimages-param-to": "The image title to stop
enumerating at. Can only be used with $1sort=name.",
"apihelp-query+allimages-param-start": "The timestamp to start
enumerating from. Can only be used with $1sort=timestamp.",
"apihelp-query+allimages-param-end": "The timestamp to end enumerating.
Can only be used with $1sort=timestamp.",
- "apihelp-query+allimages-param-prop": "Which image information to
get:\n;timestamp:Adds timestamp for the uploaded version.\n;user:Adds the user
who uploaded the image version.\n;userid:Add the user ID that uploaded the
image version.\n;comment:Comment on the version.\n;parsedcomment:Parse the
comment on the version.\n;canonicaltitle:Adds the canonical title of the image
file.\n;url:Gives URL to the image and the description page.\n;size:Adds the
size of the image in bytes and the height, width and page count (if
applicable).\n;dimensions:Alias for size.\n;sha1:Adds SHA-1 hash for the
image.\n;mime:Adds MIME type of the image.\n;mediatype:Adds the media type of
the image.\n;metadata:Lists Exif metadata for the version of the
image.\n;commonmetadata:Lists file format generic metadata for the version of
the image.\n;extmetadata:Lists formatted metadata combined from multiple
sources. Results are HTML formatted.\n;bitdepth:Adds the bit depth of the
version.",
"apihelp-query+allimages-param-prefix": "Search for all image titles
that begin with this value. Can only be used with $1sort=name.",
"apihelp-query+allimages-param-minsize": "Limit to images with at least
this many bytes.",
"apihelp-query+allimages-param-maxsize": "Limit to images with at most
this many bytes.",
@@ -614,7 +613,26 @@
"apihelp-query+fileusage-example-generator": "Get information about
pages using [[:File:Example.jpg]]",
"apihelp-query+imageinfo-description": "Returns file information and
upload history.",
- "apihelp-query+imageinfo-param-prop": "Which file information to
get:\n;timestamp:Adds timestamp for the uploaded version.\n;user:Adds the user
who uploaded each file version.\n;userid:Add the user ID that uploaded each
file version.\n;comment:Comment on the version.\n;parsedcomment:Parse the
comment on the version.\n;canonicaltitle:Adds the canonical title of the
file.\n;url:Gives URL to the file and the description page.\n;size:Adds the
size of the file in bytes and the height, width and page count (if
applicable).\n;dimensions:Alias for size.\n;sha1:Adds SHA-1 hash for the
file.\n;mime:Adds MIME type of the file.\n;thumbmime:Adds MIME type of the
image thumbnail (requires url and param $1urlwidth).\n;mediatype:Adds the media
type of the file.\n;metadata:Lists Exif metadata for the version of the
file.\n;commonmetadata:Lists file format generic metadata for the version of
the file.\n;extmetadata:Lists formatted metadata combined from multiple
sources. Results are HTML formatted.\n;archivename:Adds the file name of the
archive version for non-latest versions.\n;bitdepth:Adds the bit depth of the
version.\n;uploadwarning:Used by the Special:Upload page to get information
about an existing file. Not intended for use outside MediaWiki core.",
+ "apihelp-query+imageinfo-param-prop": "Which file information to get:",
+ "apihelp-query+imageinfo-paramvalue-prop-timestamp": "Adds timestamp
for the uploaded version.",
+ "apihelp-query+imageinfo-paramvalue-prop-user":"Adds the user who
uploaded each file version.",
+ "apihelp-query+imageinfo-paramvalue-prop-userid":"Add the user ID that
uploaded each file version.",
+ "apihelp-query+imageinfo-paramvalue-prop-comment":"Comment on the
version.",
+ "apihelp-query+imageinfo-paramvalue-prop-parsedcomment":"Parse the
comment on the version.",
+ "apihelp-query+imageinfo-paramvalue-prop-canonicaltitle":"Adds the
canonical title of the file.",
+ "apihelp-query+imageinfo-paramvalue-prop-url":"Gives URL to the file
and the description page.",
+ "apihelp-query+imageinfo-paramvalue-prop-size":"Adds the size of the
file in bytes and the height, width and page count (if applicable).",
+ "apihelp-query+imageinfo-paramvalue-prop-dimensions":"Alias for size.",
+ "apihelp-query+imageinfo-paramvalue-prop-sha1":"Adds SHA-1 hash for the
file.",
+ "apihelp-query+imageinfo-paramvalue-prop-mime":"Adds MIME type of the
file.",
+ "apihelp-query+imageinfo-paramvalue-prop-thumbmime":"Adds MIME type of
the image thumbnail (requires url and param $1urlwidth).",
+ "apihelp-query+imageinfo-paramvalue-prop-mediatype":"Adds the media
type of the file.",
+ "apihelp-query+imageinfo-paramvalue-prop-metadata":"Lists Exif metadata
for the version of the file.",
+ "apihelp-query+imageinfo-paramvalue-prop-commonmetadata":"Lists file
format generic metadata for the version of the file.",
+ "apihelp-query+imageinfo-paramvalue-prop-extmetadata":"Lists formatted
metadata combined from multiple sources. Results are HTML formatted.",
+ "apihelp-query+imageinfo-paramvalue-prop-archivename":"Adds the file
name of the archive version for non-latest versions.",
+ "apihelp-query+imageinfo-paramvalue-prop-bitdepth":"Adds the bit depth
of the version.",
+ "apihelp-query+imageinfo-paramvalue-prop-uploadwarning":"Used by the
Special:Upload page to get information about an existing file. Not intended for
use outside MediaWiki core.",
"apihelp-query+imageinfo-param-limit": "How many file revisions to
return per file.",
"apihelp-query+imageinfo-param-start": "Timestamp to start listing
from.",
"apihelp-query+imageinfo-param-end": "Timestamp to stop listing at.",
@@ -648,7 +666,17 @@
"apihelp-query+imageusage-example-generator": "Get information about
pages using [[:File:Albert Einstein Head.jpg]]",
"apihelp-query+info-description": "Get basic page information.",
- "apihelp-query+info-param-prop": "Which additional properties to
get:\n;protection:List the protection level of each page.\n;talkid:The page ID
of the talk page for each non-talk page.\n;watched:List the watched status of
each page.\n;watchers:The number of watchers, if
allowed.\n;notificationtimestamp:The watchlist notification timestamp of each
page.\n;subjectid:The page ID of the parent page for each talk
page.\n;url:Gives a full URL, an edit URL, and the canonical URL for each
page.\n;readable:Whether the user can read this page.\n;preload:Gives the text
returned by EditFormPreloadText.\n;displaytitle:Gives the way the page title is
actually displayed.",
+ "apihelp-query+info-param-prop": "Which additional properties to get:",
+ "apihelp-query+info-paramvalue-prop-protection": "List the protection
level of each page.",
+ "apihelp-query+info-paramvalue-prop-talkid": "The page ID of the talk
page for each non-talk page.",
+ "apihelp-query+info-paramvalue-prop-watched": "List the watched status
of each page.",
+ "apihelp-query+info-paramvalue-prop-watchers": "The number of watchers,
if allowed.",
+ "apihelp-query+info-paramvalue-prop-notificationtimestamp": "The
watchlist notification timestamp of each page.",
+ "apihelp-query+info-paramvalue-prop-subjectid": "The page ID of the
parent page for each talk page.",
+ "apihelp-query+info-paramvalue-prop-url": "Gives a full URL, an edit
URL, and the canonical URL for each page.",
+ "apihelp-query+info-paramvalue-prop-readable": "Whether the user can
read this page.",
+ "apihelp-query+info-paramvalue-prop-preload": "Gives the text returned
by EditFormPreloadText.",
+ "apihelp-query+info-paramvalue-prop-displaytitle": "Gives the way the
page title is actually displayed.",
"apihelp-query+info-param-token": "Use
[[Special:ApiHelp/query+tokens|action=query&meta=tokens]] instead.",
"apihelp-query+info-example-simple": "Get information about the [[Main
Page]]",
"apihelp-query+info-example-protection": "Get general and protection
information about the [[Main Page]]",
@@ -842,7 +870,6 @@
"apihelp-query+stashimageinfo-description": "Returns file information
for stashed files.",
"apihelp-query+stashimageinfo-param-filekey": "Key that identifies a
previous upload that was stashed temporarily.",
"apihelp-query+stashimageinfo-param-sessionkey": "Alias for $1filekey,
for backward compatibility.",
- "apihelp-query+stashimageinfo-param-prop": "Which image information to
get:\n;timestamp:Adds timestamp for the uploaded version.\n;canonicaltitle:Adds
the canonical title of the image file.\n;url:Gives URL to the image and the
description page.\n;size:Adds the size of the image in bytes and the height,
width and page count (if applicable).\n;dimensions:Alias for size.\n;sha1:Adds
SHA-1 hash for the image.\n;mime:Adds MIME type of the image.\n;thumbmime:Adds
MIME type of the image thumbnail (requires url and param
$1urlwidth).\n;metadata:Lists Exif metadata for the version of the
image.\n;commonmetadata:Lists file format generic metadata for the version of
the image.\n;extmetadata:Lists formatted metadata combined from multiple
sources. Results are HTML formatted.\n;bitdepth:Adds the bit depth of the
version.",
"apihelp-query+stashimageinfo-example-simple": "Returns information for
a stashed file",
"apihelp-query+stashimageinfo-example-params": "Returns thumbnails for
two stashed files",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index b81c2a6..efb3e33 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -326,7 +326,6 @@
"apihelp-query+allimages-param-to":
"{{doc-apihelp-param|query+allimages|to}}",
"apihelp-query+allimages-param-start":
"{{doc-apihelp-param|query+allimages|start}}",
"apihelp-query+allimages-param-end":
"{{doc-apihelp-param|query+allimages|end}}",
- "apihelp-query+allimages-param-prop":
"{{doc-apihelp-param|query+allimages|prop}}",
"apihelp-query+allimages-param-prefix":
"{{doc-apihelp-param|query+allimages|prefix}}",
"apihelp-query+allimages-param-minsize":
"{{doc-apihelp-param|query+allimages|minsize}}",
"apihelp-query+allimages-param-maxsize":
"{{doc-apihelp-param|query+allimages|maxsize}}",
@@ -561,7 +560,26 @@
"apihelp-query+fileusage-example-simple":
"{{doc-apihelp-example|query+fileusage}}",
"apihelp-query+fileusage-example-generator":
"{{doc-apihelp-example|query+fileusage}}",
"apihelp-query+imageinfo-description":
"{{doc-apihelp-description|query+imageinfo}}",
- "apihelp-query+imageinfo-param-prop":
"{{doc-apihelp-param|query+imageinfo|prop}}",
+ "apihelp-query+imageinfo-param-prop":
"{{doc-apihelp-param|query+imageinfo|prop|paramvalues=1}}",
+ "apihelp-query+imageinfo-paramvalue-prop-archivename":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|archivename}}",
+ "apihelp-query+imageinfo-paramvalue-prop-bitdepth":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|bitdepth}}",
+ "apihelp-query+imageinfo-paramvalue-prop-canonicaltitle":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|canonicaltitle}}",
+ "apihelp-query+imageinfo-paramvalue-prop-comment":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|comment}}",
+ "apihelp-query+imageinfo-paramvalue-prop-commonmetadata":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|commonmetadata}}",
+ "apihelp-query+imageinfo-paramvalue-prop-dimensions":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|dimensions}}",
+ "apihelp-query+imageinfo-paramvalue-prop-extmetadata":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|extmetadata}}",
+ "apihelp-query+imageinfo-paramvalue-prop-mediatype":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|mediatype}}",
+ "apihelp-query+imageinfo-paramvalue-prop-metadata":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|metadata}}",
+ "apihelp-query+imageinfo-paramvalue-prop-mime":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|mime}}",
+ "apihelp-query+imageinfo-paramvalue-prop-parsedcomment":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|parsedcomment}}",
+ "apihelp-query+imageinfo-paramvalue-prop-sha1":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|sha1}}",
+ "apihelp-query+imageinfo-paramvalue-prop-size":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|size}}",
+ "apihelp-query+imageinfo-paramvalue-prop-thumbmime":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|thumbmime}}",
+ "apihelp-query+imageinfo-paramvalue-prop-timestamp":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|timestamp}}",
+ "apihelp-query+imageinfo-paramvalue-prop-uploadwarning":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|uploadwarning}}",
+ "apihelp-query+imageinfo-paramvalue-prop-url":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|url}}",
+ "apihelp-query+imageinfo-paramvalue-prop-user":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|user}}",
+ "apihelp-query+imageinfo-paramvalue-prop-userid":
"{{doc-apihelp-paramvalue|query+imageinfo|prop|userid}}",
"apihelp-query+imageinfo-param-limit":
"{{doc-apihelp-param|query+imageinfo|limit}}",
"apihelp-query+imageinfo-param-start":
"{{doc-apihelp-param|query+imageinfo|start}}",
"apihelp-query+imageinfo-param-end":
"{{doc-apihelp-param|query+imageinfo|end}}",
@@ -592,7 +610,17 @@
"apihelp-query+imageusage-example-simple":
"{{doc-apihelp-example|query+imageusage}}",
"apihelp-query+imageusage-example-generator":
"{{doc-apihelp-example|query+imageusage}}",
"apihelp-query+info-description":
"{{doc-apihelp-description|query+info}}",
- "apihelp-query+info-param-prop":
"{{doc-apihelp-param|query+info|prop}}",
+ "apihelp-query+info-param-prop":
"{{doc-apihelp-param|query+info|prop|paramvalues=1}}",
+ "apihelp-query+info-paramvalue-prop-displaytitle":
"{{doc-apihelp-paramvalue|query+info|prop|displaytitle}}",
+ "apihelp-query+info-paramvalue-prop-notificationtimestamp":
"{{doc-apihelp-paramvalue|query+info|prop|notificationtimestamp}}",
+ "apihelp-query+info-paramvalue-prop-preload":
"{{doc-apihelp-paramvalue|query+info|prop|preload}}",
+ "apihelp-query+info-paramvalue-prop-protection":
"{{doc-apihelp-paramvalue|query+info|prop|protection}}",
+ "apihelp-query+info-paramvalue-prop-readable":
"{{doc-apihelp-paramvalue|query+info|prop|readable}}",
+ "apihelp-query+info-paramvalue-prop-subjectid":
"{{doc-apihelp-paramvalue|query+info|prop|subjectid}}",
+ "apihelp-query+info-paramvalue-prop-talkid":
"{{doc-apihelp-paramvalue|query+info|prop|talkid}}",
+ "apihelp-query+info-paramvalue-prop-url":
"{{doc-apihelp-paramvalue|query+info|prop|url}}",
+ "apihelp-query+info-paramvalue-prop-watched":
"{{doc-apihelp-paramvalue|query+info|prop|watched}}",
+ "apihelp-query+info-paramvalue-prop-watchers":
"{{doc-apihelp-paramvalue|query+info|prop|watchers}}",
"apihelp-query+info-param-token":
"{{doc-apihelp-param|query+info|token}}",
"apihelp-query+info-example-simple":
"{{doc-apihelp-example|query+info}}",
"apihelp-query+info-example-protection":
"{{doc-apihelp-example|query+info}}",
@@ -765,7 +793,6 @@
"apihelp-query+stashimageinfo-description":
"{{doc-apihelp-description|query+stashimageinfo}}",
"apihelp-query+stashimageinfo-param-filekey":
"{{doc-apihelp-param|query+stashimageinfo|filekey}}",
"apihelp-query+stashimageinfo-param-sessionkey":
"{{doc-apihelp-param|query+stashimageinfo|sessionkey}}",
- "apihelp-query+stashimageinfo-param-prop":
"{{doc-apihelp-param|query+stashimageinfo|prop}}",
"apihelp-query+stashimageinfo-example-simple":
"{{doc-apihelp-example|query+stashimageinfo}}",
"apihelp-query+stashimageinfo-example-params":
"{{doc-apihelp-example|query+stashimageinfo}}",
"apihelp-query+tags-description":
"{{doc-apihelp-description|query+tags}}",
--
To view, visit https://gerrit.wikimedia.org/r/171989
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bb061c62ebeef125062460e26306c88390f7b31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits