WikidataBuilder has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281281
Change subject: New Wikidata Build - 2016-04-03T10:00:01+0000
......................................................................
New Wikidata Build - 2016-04-03T10:00:01+0000
Change-Id: Ib87e1e0810dd1f9a19cd7f1937c4710d443bb289
---
M composer.lock
M extensions/ArticlePlaceholder/ArticlePlaceholder.php
A extensions/ArticlePlaceholder/extension.json
M extensions/ArticlePlaceholder/i18n/en.json
M extensions/ArticlePlaceholder/i18n/qqq.json
M extensions/ArticlePlaceholder/includes/SearchHookHandler.php
M extensions/ArticlePlaceholder/includes/SpecialAboutTopic.php
M extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
M extensions/Quality/i18n/en.json
M extensions/Wikibase/client/i18n/min.json
M extensions/Wikibase/client/i18n/ta.json
M extensions/Wikibase/client/i18n/war.json
M extensions/Wikibase/lib/i18n/en.json
M extensions/Wikibase/repo/i18n/ba.json
M extensions/Wikibase/repo/i18n/be-tarask.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/yi.json
M extensions/Wikibase/repo/i18n/zh-hant.json
M extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php
A extensions/WikimediaBadges/i18n/es.json
M vendor/composer/installed.json
M vendor/data-values/geo/.travis.yml
M vendor/data-values/geo/Geo.php
M vendor/data-values/geo/README.md
M vendor/data-values/geo/composer.json
M vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
M vendor/data-values/geo/src/Formatters/GlobeCoordinateFormatter.php
M vendor/data-values/geo/src/Parsers/GeoCoordinateParser.php
M vendor/data-values/geo/src/Parsers/GlobeCoordinateParser.php
M vendor/data-values/geo/src/Values/GlobeCoordinateValue.php
M vendor/data-values/geo/src/Values/LatLongValue.php
M vendor/data-values/geo/tests/bootstrap.php
M vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
M vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
M vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
M vendor/data-values/geo/tests/unit/Values/LatLongValueTest.php
42 files changed, 487 insertions(+), 396 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/81/281281/1
diff --git a/composer.lock b/composer.lock
index cc7f84b..d358885 100644
--- a/composer.lock
+++ b/composer.lock
@@ -275,22 +275,22 @@
},
{
"name": "data-values/geo",
- "version": "1.1.4",
+ "version": "1.1.6",
"source": {
"type": "git",
"url": "https://github.com/DataValues/Geo.git",
- "reference": "e7222bc743ae05bfc5213cb1e20150aa772d8668"
+ "reference": "6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/DataValues/Geo/zipball/e7222bc743ae05bfc5213cb1e20150aa772d8668",
- "reference": "e7222bc743ae05bfc5213cb1e20150aa772d8668",
+ "url":
"https://api.github.com/repos/DataValues/Geo/zipball/6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48",
+ "reference": "6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48",
"shasum": ""
},
"require": {
- "data-values/common": "~0.1",
+ "data-values/common": "~0.3.0|~0.2.0",
"data-values/data-values": "~1.0|~0.1",
- "data-values/interfaces": "~0.1",
+ "data-values/interfaces": "~0.2.0|~0.1.5",
"php": ">=5.3.0"
},
"type": "library",
@@ -334,7 +334,7 @@
"parsers",
"wikidata"
],
- "time": "2014-11-25 16:48:57"
+ "time": "2016-04-01 22:49:09"
},
{
"name": "data-values/interfaces",
@@ -777,12 +777,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "b22e234f5ac32c31896db3e9157f421c72cbdb6b"
+ "reference": "0b293d628f589e147738e85e9ca0f71b1f60cc59"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/b22e234f5ac32c31896db3e9157f421c72cbdb6b",
- "reference": "b22e234f5ac32c31896db3e9157f421c72cbdb6b",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0b293d628f589e147738e85e9ca0f71b1f60cc59",
+ "reference": "0b293d628f589e147738e85e9ca0f71b1f60cc59",
"shasum": ""
},
"require-dev": {
@@ -801,7 +801,7 @@
],
"description": "Provides a special page with Wikibase information
about a certain topic, with invitation to create an article for the topic",
"homepage":
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder",
- "time": "2016-03-24 21:32:30"
+ "time": "2016-04-02 15:40:07"
},
{
"name": "propertysuggester/property-suggester",
@@ -1459,7 +1459,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality",
- "reference": "8da0396b18a17f1649c8010db903f925707dd8af"
+ "reference": "f5fd6b397c8c295a75600c9eab024c1071e946b7"
},
"require": {
"php": ">=5.3.0",
@@ -1508,7 +1508,7 @@
"support": {
"issues":
"https://phabricator.wikimedia.org/project/profile/989/"
},
- "time": "2016-03-22 16:14:25"
+ "time": "2016-04-02 12:50:45"
},
{
"name": "wikibase/serialization-javascript",
@@ -1557,12 +1557,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "8bbffed754354a1baba1ceb0db7c7661a6d8b778"
+ "reference": "d2b92bf9f7b50b8ca591e1c6b747541db10fdeae"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/8bbffed754354a1baba1ceb0db7c7661a6d8b778",
- "reference": "8bbffed754354a1baba1ceb0db7c7661a6d8b778",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/d2b92bf9f7b50b8ca591e1c6b747541db10fdeae",
+ "reference": "d2b92bf9f7b50b8ca591e1c6b747541db10fdeae",
"shasum": ""
},
"require": {
@@ -1634,7 +1634,7 @@
"wikibaserepo",
"wikidata"
],
- "time": "2016-03-30 20:43:32"
+ "time": "2016-04-02 18:20:18"
},
{
"name": "wikibase/wikimedia-badges",
@@ -1642,7 +1642,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges",
- "reference": "c5eaaf4fa73409c1514b63ba96ace482c75f5d04"
+ "reference": "f226448d259013dcf74e0fb44e7d3dc7c20f738a"
},
"require": {
"php": ">=5.3.0"
@@ -1676,7 +1676,7 @@
"support": {
"irc": "irc://irc.freenode.net/wikidata"
},
- "time": "2016-03-27 19:26:46"
+ "time": "2016-04-01 20:31:20"
},
{
"name": "wikimedia/assert",
diff --git a/extensions/ArticlePlaceholder/ArticlePlaceholder.php
b/extensions/ArticlePlaceholder/ArticlePlaceholder.php
index 6938d55..b9c0169 100644
--- a/extensions/ArticlePlaceholder/ArticlePlaceholder.php
+++ b/extensions/ArticlePlaceholder/ArticlePlaceholder.php
@@ -10,71 +10,18 @@
* The license governing the extension code:
* @license GNU General Public Licence 2.0 or later
*/
-$wgExtensionCredits['other'][] = array(
- 'path' => __FILE__,
- 'name' => 'ArticlePlaceholder',
- 'author' => array(
- 'Lucie-Aimée Kaffee',
- ),
- 'url' => 'https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder',
- 'descriptionmsg' => 'articleplaceholder-desc',
-);
-$wgArticlePlaceholderImageProperty = 'P18';
-
-$wgAutoloadClasses['ArticlePlaceholder\SpecialAboutTopic']
- = __DIR__ . '/includes/SpecialAboutTopic.php';
-$wgAutoloadClasses['ArticlePlaceholder\Lua\Scribunto_LuaArticlePlaceholderLibrary']
- = __DIR__ . '/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php';
-$wgAutoloadClasses['ArticlePlaceholder\Hooks'] = __DIR__ .
'/includes/Hooks.php';
-$wgAutoloadClasses['ArticlePlaceholder\SearchHookHandler']
- = __DIR__ . '/includes/SearchHookHandler.php';
-
-$wgHooks['ScribuntoExternalLibraries'][]
- = '\ArticlePlaceholder\Hooks::onScribuntoExternalLibraries';
-$wgHooks['ScribuntoExternalLibraryPaths'][]
- = '\ArticlePlaceholder\Hooks::registerScribuntoExternalLibraryPaths';
-$wgHooks['SpecialSearchResultsAppend'][]
- = '\ArticlePlaceholder\SearchHookHandler::onSpecialSearchResultsAppend';
-
-$wgHooks['UnitTestsList'][] = 'ArticlePlaceholder\Hooks::onUnitTestsList';
-
-$wgMessagesDirs['ArticlePlaceholder'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['ArticlePlaceholderAliases'] = __DIR__ .
'/ArticlePlaceholder.alias.php';
-
-$wgSpecialPages['AboutTopic'] = array(
- 'ArticlePlaceholder\SpecialAboutTopic',
- 'newFromGlobalState'
-);
-
-preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)'
- . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath );
-
-$commonModuleInfo = array(
- 'localBasePath' => __DIR__ . '/modules',
- 'remoteExtPath' => '..' . $remoteExtPath[0] . '/modules',
-);
-
-$wgResourceModules['ext.articleplaceholder.createArticle'] = array(
- 'position' => 'bottom',
- 'scripts' => 'ext.articleplaceholder.createArticle.js',
- 'dependencies' => array(
- 'oojs-ui',
- 'mediawiki.api',
- 'mediawiki.Title',
- 'mediawiki.util'
- ),
- 'messages' => array(
- 'articleplaceholder-abouttopic-create-article',
- 'articleplaceholder-abouttopic-article-exists-error',
- 'articleplaceholder-abouttopic-create-article-submit-button'
- ),
-) + $commonModuleInfo;
-
-$wgResourceModules['ext.articleplaceholder.defaultDisplay'] = array(
- 'styles' => array(
- 'ext.articleplaceholder.defaultDisplay.css',
- 'ext.articleplaceholder.defaultDisplaySmall.css' => array(
'media' => '(max-width: 880px)' ),
- ),
- 'position' => 'top',
-) + $commonModuleInfo;
+if ( function_exists( 'wfLoadExtension' ) ) {
+ wfLoadExtension( 'ArticlePlaceholder' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['ArticlePlaceholder'] = __DIR__ . '/i18n';
+ $wgExtensionMessagesFiles['ArticlePlaceholder'] = __DIR__ .
'/ArticlePlaceholder.alias.php';
+ /* wfWarn(
+ 'Deprecated PHP entry point used for ArticlePlaceholder
extension. ' .
+ 'Please use wfLoadExtension instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for
more details.'
+ ); */
+ return true;
+} else {
+ die( 'This version of the ArticlePlaceholder extension requires
MediaWiki 1.25+' );
+}
diff --git a/extensions/ArticlePlaceholder/extension.json
b/extensions/ArticlePlaceholder/extension.json
new file mode 100644
index 0000000..84640c2
--- /dev/null
+++ b/extensions/ArticlePlaceholder/extension.json
@@ -0,0 +1,80 @@
+{
+ "name": "ArticlePlaceholder",
+ "author": [
+ "Lucie-Aimée Kaffee"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder",
+ "descriptionmsg": "articleplaceholder-desc",
+ "type": "other",
+ "SpecialPages": {
+ "AboutTopic": [
+ "ArticlePlaceholder\\SpecialAboutTopic",
+ "newFromGlobalState"
+ ]
+ },
+ "MessagesDirs": {
+ "ArticlePlaceholder": [
+ "i18n"
+ ]
+ },
+ "ExtensionMessagesFiles": {
+ "ArticlePlaceholderAliases": "ArticlePlaceholder.alias.php"
+ },
+ "AutoloadClasses": {
+ "ArticlePlaceholder\\SpecialAboutTopic":
"includes/SpecialAboutTopic.php",
+
"ArticlePlaceholder\\Lua\\Scribunto_LuaArticlePlaceholderLibrary":
"includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php",
+ "ArticlePlaceholder\\Hooks": "includes/Hooks.php",
+ "ArticlePlaceholder\\SearchHookHandler":
"includes/SearchHookHandler.php"
+ },
+ "ResourceModules": {
+ "ext.articleplaceholder.createArticle": {
+ "position": "bottom",
+ "scripts": "ext.articleplaceholder.createArticle.js",
+ "dependencies": [
+ "oojs-ui",
+ "mediawiki.api",
+ "mediawiki.Title",
+ "mediawiki.util"
+ ],
+ "messages": [
+ "articleplaceholder-abouttopic-create-article",
+
"articleplaceholder-abouttopic-article-exists-error",
+
"articleplaceholder-abouttopic-create-article-submit-button",
+
"articleplaceholder-abouttopic-create-article-label",
+
"articleplaceholder-abouttopic-create-article-mandatory",
+ "cancel"
+ ]
+ },
+ "ext.articleplaceholder.defaultDisplay": {
+ "styles": {
+ "0":
"ext.articleplaceholder.defaultDisplay.css",
+
"ext.articleplaceholder.defaultDisplaySmall.css": {
+ "media": "(max-width: 880px)"
+ }
+ },
+ "position": "top"
+ }
+ },
+ "ResourceFileModulePaths": {
+ "localBasePath": "modules",
+ "remoteExtPath": "ArticlePlaceholder/modules"
+ },
+ "Hooks": {
+ "ScribuntoExternalLibraries": [
+
"\\ArticlePlaceholder\\Hooks::onScribuntoExternalLibraries"
+ ],
+ "ScribuntoExternalLibraryPaths": [
+
"\\ArticlePlaceholder\\Hooks::registerScribuntoExternalLibraryPaths"
+ ],
+ "SpecialSearchResultsAppend": [
+
"\\ArticlePlaceholder\\SearchHookHandler::onSpecialSearchResultsAppend"
+ ],
+ "UnitTestsList": [
+ "ArticlePlaceholder\\Hooks::onUnitTestsList"
+ ]
+ },
+ "config": {
+ "ArticlePlaceholderImageProperty": "P18"
+ },
+ "manifest_version": 1
+}
diff --git a/extensions/ArticlePlaceholder/i18n/en.json
b/extensions/ArticlePlaceholder/i18n/en.json
index c612e53..7aff39f 100644
--- a/extensions/ArticlePlaceholder/i18n/en.json
+++ b/extensions/ArticlePlaceholder/i18n/en.json
@@ -7,10 +7,12 @@
"articleplaceholder-desc": "Provides a special page with {{WBREPONAME}}
information about a certain topic, with invitation to create an article for the
topic",
"articleplaceholder-abouttopic": "About topic",
"articleplaceholder-abouttopic-intro": "This special page generates a
content page about a certain topic with {{WBREPONAME}} information",
- "articleplaceholder-abouttopic-entityid": "Enter an entity id to get an
auto-generated article placeholder.",
+ "articleplaceholder-abouttopic-entityid": "Enter an entity ID to get an
auto-generated article placeholder.",
"articleplaceholder-abouttopic-submit": "craft",
- "articleplaceholder-abouttopic-no-entity-error": "This is not a valid
entity id.",
+ "articleplaceholder-abouttopic-no-entity-error": "This is not a valid
entity ID.",
"articleplaceholder-abouttopic-create-article": "Create a new article
with the title",
+ "articleplaceholder-abouttopic-create-article-label": "Article title",
+ "articleplaceholder-abouttopic-create-article-mandatory": "The title of
the article is mandatory.",
"articleplaceholder-abouttopic-create-article-button": "Create an
article",
"articleplaceholder-abouttopic-create-article-submit-button": "Submit",
"articleplaceholder-abouttopic-article-exists-error": "An article with
this name already exists",
diff --git a/extensions/ArticlePlaceholder/i18n/qqq.json
b/extensions/ArticlePlaceholder/i18n/qqq.json
index a9848e7..6b4e521 100644
--- a/extensions/ArticlePlaceholder/i18n/qqq.json
+++ b/extensions/ArticlePlaceholder/i18n/qqq.json
@@ -13,6 +13,8 @@
"articleplaceholder-abouttopic-submit": "Label on the submit
button.\n{{Identical|Craft}}",
"articleplaceholder-abouttopic-no-entity-error": "Error message in case
of an invalid entity id.",
"articleplaceholder-abouttopic-create-article": "Text in the popup
encouraging the user to create an article with a selectable title",
+ "articleplaceholder-abouttopic-create-article-label": "Label of the
article page title input in the 'Create article' popup.",
+ "articleplaceholder-abouttopic-create-article-mandatory": "Used as an
error message in the 'Create article', if the article title wasn't supplied.",
"articleplaceholder-abouttopic-create-article-button": "Label on create
article button",
"articleplaceholder-abouttopic-create-article-submit-button": "Label on
submit button\n{{Identical|Submit}}",
"articleplaceholder-abouttopic-article-exists-error": "Error to
indicate the given article title already exists",
diff --git a/extensions/ArticlePlaceholder/includes/SearchHookHandler.php
b/extensions/ArticlePlaceholder/includes/SearchHookHandler.php
index daa0a51..3c18000 100644
--- a/extensions/ArticlePlaceholder/includes/SearchHookHandler.php
+++ b/extensions/ArticlePlaceholder/includes/SearchHookHandler.php
@@ -4,6 +4,7 @@
use OutputPage;
use SpecialSearch;
+use SpecialPage;
use Wikibase\Client\WikibaseClient;
use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
use Wikibase\Lib\Interactors\TermSearchResult;
@@ -34,19 +35,17 @@
private $languageCode;
/**
- * @param string $language user language
+ * @param SpecialPage $specialPage
*
* @return self
*/
- private static function newFromGlobalState( $language ) {
- global $wgLanguageCode;
-
+ private static function newFromGlobalState( SpecialPage $specialPage ) {
$wikibaseClient = WikibaseClient::getDefaultInstance();
return new self(
$wikibaseClient->getStore()->getTermIndex(),
- $wikibaseClient->newTermSearchInteractor( $language ),
- $wgLanguageCode
+ $wikibaseClient->newTermSearchInteractor(
$specialPage->getLanguage()->getCode() ),
+ $specialPage->getConfig()->get( 'LanguageCode' )
);
}
@@ -80,8 +79,7 @@
if ( $term === null || $term === '' ) {
return;
}
- // user language, not content language
- $instance = self::newFromGlobalState(
$specialSearch->getLanguage()->getCode() );
+ $instance = self::newFromGlobalState( $specialSearch );
$instance->addToSearch( $specialSearch, $output, $term );
return true;
}
@@ -94,18 +92,14 @@
public function addToSearch( SpecialSearch $specialSearch, OutputPage
$output, $term ) {
$searchResult = $this->getSearchResults( $term );
if ( $searchResult !== null ) {
- $output->addWikiText( $this->getSearchHeader() );
+ $output->addWikiText(
+ '==' .
+ $output->msg(
'articleplaceholder-search-header' )->text() .
+ '=='
+ );
$output->addWikiText( $searchResult );
}
- }
-
- /**
- * @return string
- */
- private function getSearchHeader() {
- $header = '==' . wfMessage( 'articleplaceholder-search-header'
)->text() . '==';
- return $header;
}
/**
diff --git a/extensions/ArticlePlaceholder/includes/SpecialAboutTopic.php
b/extensions/ArticlePlaceholder/includes/SpecialAboutTopic.php
index 55b35ed..2b983b9 100644
--- a/extensions/ArticlePlaceholder/includes/SpecialAboutTopic.php
+++ b/extensions/ArticlePlaceholder/includes/SpecialAboutTopic.php
@@ -252,7 +252,10 @@
$this->getOutput()->addWikiText( '{{aboutTopic|' .
$entityId->getSerialization() . '}}' );
$label = $this->getLabel( $entityId );
$this->showTitle( $label );
- $this->showCreateArticle( $label );
+ $labelTitle = Title::newFromText( $label );
+ if ( $labelTitle && $labelTitle->quickUserCan( 'createpage',
$this->getUser() ) ) {
+ $this->showCreateArticle( $label );
+ }
$this->showLanguageLinks( $entityId );
}
@@ -260,11 +263,8 @@
$output = $this->getOutput();
$output->enableOOUI();
- $modules = array(
- 'ext.articleplaceholder.createArticle',
- 'ext.articleplaceholder.defaultDisplay'
- );
- $output->addModules( $modules );
+ $output->addModuleStyles(
'ext.articleplaceholder.defaultDisplay' );
+ $output->addModules( 'ext.articleplaceholder.createArticle' );
$output->addJsConfigVars( 'apLabel', $label );
$button = new OOUI\ButtonWidget( array(
diff --git
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
index e755db7..161958e 100644
---
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
+++
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
@@ -8,31 +8,40 @@
var titleInput;
- function onSubmit() {
+ function onSubmit( deferred ) {
var titleRaw = titleInput.getValue(),
api = new mw.Api();
- api.get( { action: 'query', titles: titleRaw } ).done( function
( data ) {
- var query = data.query,
- pageKeys = Object.keys( query.pages ),
- title,
- link;
+ if ( titleRaw.trim() === '' ) {
+ deferred.reject( new OO.ui.Error(
+ mw.msg(
'articleplaceholder-abouttopic-create-article-mandatory' )
+ ) );
+ } else {
+ api.get( { action: 'query', titles: titleRaw } ).done(
function ( data ) {
+ var query = data.query,
+ pageKeys,
+ title,
+ link;
- if ( titleRaw !== titleInput.getValue() ) {
- return;
- }
+ if ( query && query.hasOwnProperty( 'pages' ) )
{
+ pageKeys = Object.keys( query.pages );
+ if ( titleRaw !== titleInput.getValue()
) {
+ return;
+ }
- if ( pageKeys[ 0 ] === '-1' ) {
- title = mw.Title.newFromUserInput( titleRaw, 0
);
- link = '?title=' + encodeURIComponent(
title.getNameText() ) + '&action=edit';
- link = mw.util.wikiScript() + link;
- document.location.href = link;
- } else {
- $( '#mw-article-placeholder-error' ).append(
- '<p>' + mw.message(
'articleplaceholder-abouttopic-article-exists-error' ).escaped() + '</p>'
- );
- }
- } );
+ if ( pageKeys[ 0 ] === '-1' ) {
+ title =
mw.Title.newFromUserInput( titleRaw, 0 );
+ link = '?title=' +
encodeURIComponent( title.getNameText() ) + '&action=edit';
+ link = mw.util.wikiScript() +
link;
+ document.location.href = link;
+ } else {
+ deferred.reject( new
OO.ui.Error(
+ mw.msg(
'articleplaceholder-abouttopic-article-exists-error' )
+ ) );
+ }
+ }
+ } );
+ }
return false;
}
@@ -41,38 +50,32 @@
var dialog,
windowManager,
button,
- submitButton,
- dialogContent
-;
+ dialogContent;
+
titleInput = new OO.ui.TextInputWidget( {
value: mw.config.get( 'apLabel' ),
+ label: mw.msg(
'articleplaceholder-abouttopic-create-article-label' ),
multiline: false,
+ required: true,
autosize: true
} );
- submitButton = new OO.ui.ButtonWidget( {
- label: mw.message(
'articleplaceholder-abouttopic-create-article-submit-button' ).text()
- } );
-
- dialogContent = $( '<p>' + mw.message(
'articleplaceholder-abouttopic-create-article' ).escaped() + '</p>' );
- dialogContent.append( titleInput.$element );
- dialogContent.append( submitButton.$element );
- dialogContent.append( '<div
id="mw-article-placeholder-error"></div>' );
-
- submitButton.on( 'click', onSubmit );
-
- titleInput.on( 'change', function () {
- $( '#mw-article-placeholder-error' ).empty();
- } );
-
- titleInput.on( 'enter', function () {
- submitButton.emit( 'click' );
- } );
+ dialogContent = titleInput.$element;
function CreateArticleDialog( config ) {
CreateArticleDialog.super.call( this, config ); //
jshint:ignore
}
- OO.inheritClass( CreateArticleDialog, OO.ui.Dialog );
+ OO.inheritClass( CreateArticleDialog, OO.ui.ProcessDialog );
+
+ CreateArticleDialog.static.title = mw.message(
'articleplaceholder-abouttopic-create-article' ).text();
+ CreateArticleDialog.static.actions = [
+ {
+ action: 'save',
+ label: mw.message(
'articleplaceholder-abouttopic-create-article-submit-button' ).text(),
+ flags: [ 'primary', 'progressive' ]
+ },
+ { label: mw.message( 'cancel' ).text(), flags: 'safe' }
+ ];
// Customize the initialize() function: This is where to add
content to the dialog body and set up event handlers.
CreateArticleDialog.prototype.initialize = function () {
@@ -83,19 +86,36 @@
};
CreateArticleDialog.prototype.getBodyHeight = function () {
- return this.content.$element.outerHeight( true );
+ return this.content.$element.outerHeight( true ) * 2;
+ };
+
+ CreateArticleDialog.prototype.getActionProcess = function (
action ) {
+ if ( action ) {
+ return new OO.ui.Process( function () {
+ var saveDeferred = $.Deferred();
+ onSubmit( saveDeferred );
+
+ return saveDeferred.promise();
+ }, this );
+ }
+ return
CreateArticleDialog.parent.prototype.getActionProcess.call( this, action );
};
dialog = new CreateArticleDialog( {
size: 'medium'
} );
+
+ titleInput.on( 'enter', function () {
+ dialog.executeAction( 'save' );
+ } );
+
windowManager = new OO.ui.WindowManager();
- button = OO.ui.infuse( 'create-article-button' );
$( 'body' ).append( windowManager.$element );
// Add the window to the window manager using the addWindows()
method.
windowManager.addWindows( [ dialog ] );
+ button = OO.ui.infuse( 'create-article-button' );
button.on( 'click', function () {
windowManager.openWindow( dialog );
} );
diff --git a/extensions/Quality/i18n/en.json b/extensions/Quality/i18n/en.json
index 3d9ec5c..f47f82f 100644
--- a/extensions/Quality/i18n/en.json
+++ b/extensions/Quality/i18n/en.json
@@ -43,11 +43,11 @@
"apihelp-wbqgetviolationmessages-example": "Get messages for data
violations of item Q76.",
"apihelp-wbqmodifyviolation-description": "Modifies a specific data
violation. Keep in mind that only users with specific rights can modify
violations.",
- "apihelp-wbqmodifyviolation-param-claimguid": "The claim GUID of the
data violation that should be modified. Together with the constraint id, this
identifies the violation.",
- "apihelp-wbqmodifyviolation-param-constraintid": "The constraint id of
the data violation that should be modified. Together with the claimguid this
identifies the violation.",
+ "apihelp-wbqmodifyviolation-param-claimguid": "The claim GUID of the
data violation that should be modified. Together with the constraint ID, this
identifies the violation.",
+ "apihelp-wbqmodifyviolation-param-constraintid": "The constraint ID of
the data violation that should be modified. Together with the claim GUID this
identifies the violation.",
"apihelp-wbqmodifyviolation-param-status": "The new status, which
should be set for this violation.",
- "apihelp-wbqmodifyviolation-examples-exception": "Change the status of
the violation identified by constraint id and claim GUID to exception.",
- "apihelp-wbqmodifyviolation-examples-violation": "Change the status of
the violation identified by constraint id and claim GUID to violation.",
+ "apihelp-wbqmodifyviolation-examples-exception": "Change the status of
the violation identified by constraint ID and claim GUID to exception.",
+ "apihelp-wbqmodifyviolation-examples-violation": "Change the status of
the violation identified by constraint ID and claim GUID to violation.",
"apihelp-wbqgetviolationtypes-description": "Returns a list of all
supported violation types.",
"apihelp-wbqgetviolationtypes-param-groupid": "An optional parameter
that restricts the violation types to the ones associated with the given
group.",
diff --git a/extensions/Wikibase/client/i18n/min.json
b/extensions/Wikibase/client/i18n/min.json
index cb6adb3..1053ba3 100644
--- a/extensions/Wikibase/client/i18n/min.json
+++ b/extensions/Wikibase/client/i18n/min.json
@@ -1,10 +1,12 @@
{
"@metadata": {
"authors": [
- "Iwan Novirion"
+ "Iwan Novirion",
+ "Naval Scene"
]
},
"wikibase-client-desc": "Klien untuak ekstensi Wikibase",
+ "tooltip-t-wikibase": "Pautan untuak maubuangan ka item panyimpanan
data",
"wikibase-after-page-move": "Sanak paralu juo [$1 mampabarui item] nan
tapauik di Wikidata dalam hal interwiki sangkek mamindahan laman.",
"wikibase-after-page-move-queued": "[$1 Item Wikidata] nan takaik ka
laman ko akan sacaro otomatih dipabarui sacapeknyo.",
"wikibase-comment-remove": "Item Wikidata takait dihapuih. Interwiki
hilang.",
@@ -16,6 +18,7 @@
"wikibase-comment-sitelink-change": "Interwiki barubah dari $1 ka $2",
"wikibase-comment-sitelink-remove": "Pangurangan interwiki: $1",
"wikibase-comment-multi": "$1 {{PLURAL:$1|parubahan}}",
+ "wikibase-dataitem": "Item di {{WBREPONAME}}",
"wikibase-editlinks": "Suntiang interwiki",
"wikibase-editlinkstitle": "Suntiang pranala interwiki",
"wikibase-linkitem-addlinks": "Tambah interwiki",
diff --git a/extensions/Wikibase/client/i18n/ta.json
b/extensions/Wikibase/client/i18n/ta.json
index 711d54d..663fda9 100644
--- a/extensions/Wikibase/client/i18n/ta.json
+++ b/extensions/Wikibase/client/i18n/ta.json
@@ -4,7 +4,8 @@
"Shanmugamp7",
"மதனாஹரன்",
"Jayarathina",
- "கலைவாணன்"
+ "கலைவாணன்",
+ "AntanO"
]
},
"wikibase-dataitem": "{{WBREPONAME}}உருப்படி",
@@ -14,6 +15,6 @@
"wikibase-rc-hide-wikidata-hide": "மறை",
"wikibase-rc-hide-wikidata-show": "காட்டு",
"wikibase-rc-show-wikidata-pref": "விக்கித்தரவு தொகுப்புகளை அண்மைய
மாற்றங்களில் காண்பி",
- "wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} தொகு",
+ "wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} தொகுப்பு",
"wikibase-otherprojects": "பிற திட்டங்கள்"
}
diff --git a/extensions/Wikibase/client/i18n/war.json
b/extensions/Wikibase/client/i18n/war.json
index 94e641a..bdef301 100644
--- a/extensions/Wikibase/client/i18n/war.json
+++ b/extensions/Wikibase/client/i18n/war.json
@@ -14,5 +14,5 @@
"wikibase-rc-hide-wikidata-show": "Pakit-a",
"wikibase-rc-wikibase-edit-letter": "D",
"wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} nga pagliwat",
- "wikibase-otherprojects": "Iba nga mga proyekto"
+ "wikibase-otherprojects": "Ha iba nga mga proyekto"
}
diff --git a/extensions/Wikibase/lib/i18n/en.json
b/extensions/Wikibase/lib/i18n/en.json
index 99158b5..c6c79b0 100644
--- a/extensions/Wikibase/lib/i18n/en.json
+++ b/extensions/Wikibase/lib/i18n/en.json
@@ -39,7 +39,7 @@
"wikibase-globedetails-globe": "Globe",
"wikibase-parse-error": "Malformed value.",
"wikibase-parse-error-coordinate": "The coordinate value is malformed.",
- "wikibase-parse-error-entity-id": "The entity id is malformed.",
+ "wikibase-parse-error-entity-id": "The entity ID is malformed.",
"wikibase-parse-error-quantity": "The quantity value is malformed.",
"wikibase-parse-error-time": "The time value is malformed.",
"wikibase-sitelinks-wikipedia": "Wikipedia",
diff --git a/extensions/Wikibase/repo/i18n/ba.json
b/extensions/Wikibase/repo/i18n/ba.json
index e80dfbb..b0436e2 100644
--- a/extensions/Wikibase/repo/i18n/ba.json
+++ b/extensions/Wikibase/repo/i18n/ba.json
@@ -3,7 +3,8 @@
"authors": [
"Рустам Нурыев",
"Sagan",
- "Айсар"
+ "Айсар",
+ "Вильданова Гюзель"
]
},
"wikibase-edit": "үҙгәртергә",
@@ -15,5 +16,5 @@
"wikibase-aliases-empty": "Альтернатив исемдәр (синонимдар)
күрһәтелмәгән",
"wikibase-statementview-rank-normal": "Нормаль ранг",
"wikibase-statementview-referencesheading-pendingcountersubject":
"{{PLURAL:$1|сығанаҡ}}",
- "wikibase-redirectentity-success": "$ 1 йүнәлтелгән $ 2."
+ "wikibase-redirectentity-success": "$ 1 $ 2 -гә кире йүнәлтелгән"
}
diff --git a/extensions/Wikibase/repo/i18n/be-tarask.json
b/extensions/Wikibase/repo/i18n/be-tarask.json
index a525ee2..7373a73 100644
--- a/extensions/Wikibase/repo/i18n/be-tarask.json
+++ b/extensions/Wikibase/repo/i18n/be-tarask.json
@@ -39,6 +39,7 @@
"wikibase-diffview-rank": "ранг",
"wikibase-diffview-rank-preferred": "Прыярытэтны ранг",
"wikibase-diffview-rank-normal": "Звычайны ранг",
+ "wikibase-diffview-rank-deprecated": "Састарэлы ранг",
"wikibase-diffview-qualifier": "кваліфікатар",
"wikibase-diffview-label": "метка",
"wikibase-diffview-alias": "сынонімы",
diff --git a/extensions/Wikibase/repo/i18n/en.json
b/extensions/Wikibase/repo/i18n/en.json
index 0965f81..a74bbda 100644
--- a/extensions/Wikibase/repo/i18n/en.json
+++ b/extensions/Wikibase/repo/i18n/en.json
@@ -143,7 +143,7 @@
"wikibase-gotolinkedpage-lookup-site": "Site:",
"wikibase-gotolinkedpage-lookup-item": "Item ID:",
"wikibase-gotolinkedpage-submit": "Go",
- "wikibase-gotolinkedpage-summary": "Special:GoToLinkedPage is used to
find the page for an item on a connected site.<br />The first field,
\"{{int:wikibase-gotolinkedpage-lookup-site}}\", is where you enter the
language and site code.<br />For the second field,
\"{{int:wikibase-gotolinkedpage-lookup-item}}\", you must put in the item id
you are looking for.",
+ "wikibase-gotolinkedpage-summary": "Special:GoToLinkedPage is used to
find the page for an item on a connected site.<br />The first field,
\"{{int:wikibase-gotolinkedpage-lookup-site}}\", is where you enter the
language and site code.<br />For the second field,
\"{{int:wikibase-gotolinkedpage-lookup-item}}\", you must put in the item ID
you are looking for.",
"wikibase-gotolinkedpage-error-page-not-found": "There was no page
found for that combination of item and site",
"wikibase-gotolinkedpage-error-item-id-invalid": "The entered ID of the
item is not valid",
"wikibase-gotolinkedpage-error-item-not-found": "Item was not found",
@@ -200,7 +200,7 @@
"wikibase-setlabeldescriptionaliases-submit": "Set label, description
and aliases",
"special-setsitelink": "Set a sitelink",
"wikibase-setsitelink-introfull": "You are setting the sitelink of $2
for [[$1]].",
- "wikibase-setsitelink-intro": "This form allows you to set the sitelink
of an item. You need to provide the ID of the item (e.g. Q23), a site id (e.g.
\"enwiki\") and the sitelink to set to.",
+ "wikibase-setsitelink-intro": "This form allows you to set the sitelink
of an item. You need to provide the ID of the item (e.g. Q23), a site ID (e.g.
\"enwiki\") and the sitelink to set to.",
"wikibase-setsitelink-intro-badges": "Additionally you can set various
badges for this sitelink which are listed below.",
"wikibase-setsitelink-site": "Site ID:",
"wikibase-setsitelink-label": "Sitelink:",
@@ -427,7 +427,7 @@
"apihelp-wbformatvalue-param-datatype": "The value's data type. This is
distinct from the value's type",
"apihelp-wbformatvalue-param-datavalue": "The data to format. This has
to be the JSON serialization of a DataValue object.",
"apihelp-wbformatvalue-param-options": "The options the formatter
should use. Provided as a JSON object.",
- "apihelp-wbformatvalue-param-property": "Property id the data value
belongs to, should be used instead of the datatype parameter.",
+ "apihelp-wbformatvalue-param-property": "Property ID the data value
belongs to, should be used instead of the datatype parameter.",
"apihelp-wbformatvalue-example-1": "Format a simple string value.",
"apihelp-wbformatvalue-example-2": "Format a string value as a URL in
HTML.",
"apihelp-wbgetclaims-description": "Gets Wikibase claims.",
@@ -449,7 +449,7 @@
"apihelp-wbgetentities-param-languages": "By default the
internationalized values are returned in all available languages.\nThis
parameter allows filtering these down to one or more languages by providing one
or more language codes.",
"apihelp-wbgetentities-param-languagefallback": "Apply language
fallback for languages defined in the \"languages\" parameter, with the current
context of API call.",
"apihelp-wbgetentities-param-normalize": "Try to normalize the page
title against the client site.\nThis only works if exactly one site and one
page have been given.",
- "apihelp-wbgetentities-param-sitefilter": "Filter sitelinks in entities
to those with these siteids.",
+ "apihelp-wbgetentities-param-sitefilter": "Filter sitelinks in entities
to those with these site IDs.",
"apihelp-wbgetentities-example-1": "Get entities with ID Q42 with all
available attributes in all available languages",
"apihelp-wbgetentities-example-2": "Get entities with ID P17 with all
available attributes in all available languages",
"apihelp-wbgetentities-example-3": "Get entities with IDs Q42 and P17
with all available attributes in all available languages",
diff --git a/extensions/Wikibase/repo/i18n/yi.json
b/extensions/Wikibase/repo/i18n/yi.json
index a4d8bb5..1458bee 100644
--- a/extensions/Wikibase/repo/i18n/yi.json
+++ b/extensions/Wikibase/repo/i18n/yi.json
@@ -26,6 +26,8 @@
"wikibase-entitytermsforlanguagelistview-description": "באַשרײַבונג",
"wikibase-entitytermsforlanguagelistview-label": "באצייכענונג",
"wikibase-entitytermsforlanguagelistview-language": "שפראַך",
+ "wikibase-entitytermsforlanguagelistview-more": "נאך שפראַכן",
+ "wikibase-entitytermsforlanguagelistview-less": "ווייניגע שפראכן",
"wikibase-label-empty": "קיין באצייכענונג נישט דעפֿינירט",
"wikibase-label-edit-placeholder": "אריינגעבן באצייכענונג",
"wikibase-label-edit-placeholder-language-aware": "אײַנגעבן באצייכענונג
אויף $1",
@@ -48,13 +50,10 @@
"wikibase-sitelink-page-edit-placeholder": "בלאט",
"wikibase-alias-edit-placeholder": "ארײַנגעבן אליאס",
"wikibase-label-input-help-message": "איינגעבן די באצייכענונג פון דער
וועזנהייט אין $1.",
- "wikibase-description-input-help-message": "איינגעבן א קורצע באשרייבונג
פאר דער וועזנהייט אויף $1.",
"wikibase-entitytermsview-input-help-message": "איינגעבן א באצייכענונג
פאר דעם אביעקט, א קורצע באשרייבונג און אליאסן לויט דער שפראך.",
- "wikibase-entitytermsforlanguageview-input-help-message": "גיט די
באצייכענונג פאר דעם אביעקט, א קורצן באשרייבונג און אליאסן אין $1.",
- "wikibase-statements": "אַרויסזאָגן",
+ "wikibase-statementsection-statements": "אַרויסזאָגן",
"wikibase-sitelinks": "וועבזײַטל לינקען",
"wikibase-sitelinks-empty": "קיין בלאט איז נישט פארלינקט מיט דעם
דאטנאביעקט.",
- "wikibase-sitelinks-input-help-message": "שטעלן א לינק צו א בלאט
פֿארבונדן מיט דעם דאטנאביעקט.",
"wikibase-sitelinks-special": "אנדערע וועבזייטלעך",
"wikibase-remove": "אַראָפּנעמען",
"wikibase-move-up": "אַרויפֿרוקן",
@@ -139,6 +138,7 @@
"wikibase-newitem-fieldset": "שאפֿן א נײַעם דאטנאביעקט",
"wikibase-newitem-site": "וועבזייטל פון ערשטן פארלינקטן בלאט",
"wikibase-newitem-page": "נאמען פון ערשטן פארלינקטן בלאט",
+ "wikibase-newentity-language": "שפראַך:",
"wikibase-newentity-label": "באצייכענונג:",
"wikibase-newentity-description": "באַשרײַבונג:",
"wikibase-newentity-submit": "שאַפֿן",
@@ -173,6 +173,7 @@
"wikibase-modifyentity-id": "אידענטיפֿיצירער",
"wikibase-modifyterm-language": "שפראַך קאד:",
"special-mergeitems": "צונויפמישן צוויי דאטנאביעקטן",
+ "wikibase-mergeitems-submit": "צונויפֿפֿירן אביעקטן",
"wikibase-itemmerge-no-such-entity": "אביעקט נישט געפונען",
"special-dispatchstats": "ענדערן פֿארשפרייטן סטאטיסטיק",
"wikibase-dispatchstats-no-stats": "אצינד זענען נישט פֿאראן קיין
סטאטיסטיק.",
@@ -232,6 +233,7 @@
"wikibase-listdatatypes-string-head": "שנורל",
"wikibase-listdatatypes-time-head": "צײַט",
"wikibase-listdatatypes-url-head": "URL",
+ "wikibase-listdatatypes-external-id-head": "דרויסנדיקער
אידענטיפֿיצירער",
"datatypes-type-url": "URL",
"content-model-wikibase-item": "Wikibase-דאטנאביעקט",
"content-model-wikibase-property": "Wikibase-אייגנשאפֿט",
@@ -241,6 +243,8 @@
"right-property-create": "שאַפן אייגנשאַפֿטן",
"action-property-create": "שאַפן אייגנשאַפֿטן",
"apihelp-wbeditentity-example-2": "שאפן א נייעם אביעקט און שטעלן
באצייכענונגען פאר de און en",
+ "apihelp-wbeditentity-example-12": "אראפנעמען א באצייכענונג",
"apihelp-wbremoveclaims-description": "נעמט אראפ וויקיבאזע טענות.",
+ "apihelp-wbsetdescription-param-language": "שפראך פון באשרייבונג",
"apihelp-wbsetlabel-param-language": "שפראך פון דער באצייכענונג"
}
diff --git a/extensions/Wikibase/repo/i18n/zh-hant.json
b/extensions/Wikibase/repo/i18n/zh-hant.json
index 1582234..6c152ed 100644
--- a/extensions/Wikibase/repo/i18n/zh-hant.json
+++ b/extensions/Wikibase/repo/i18n/zh-hant.json
@@ -14,7 +14,8 @@
"LNDDYL",
"Cwlin0416",
"Zhxy 519",
- "飞舞回堂前"
+ "飞舞回堂前",
+ "Gi25ni"
]
},
"wikibase-desc": "結構化資料儲存庫",
@@ -39,12 +40,14 @@
"wikibase-entitytermsforlanguagelistview-label": "標籤",
"wikibase-entitytermsforlanguagelistview-language": "語言",
"wikibase-entitytermsforlanguagelistview-more": "更多語言",
+ "wikibase-entitytermsforlanguagelistview-less": "較少種語言",
"wikibase-label-empty": "尚未定義標籤",
"wikibase-label-edit-placeholder": "輸入標籤",
"wikibase-label-edit-placeholder-language-aware": "使用 $1 輸入標籤",
"wikibase-description-empty": "尚未定義描述",
"wikibase-description-edit-placeholder": "輸入描述",
"wikibase-description-edit-placeholder-language-aware": "使用 $1 輸入描述",
+ "wikibase-aliases-edit-placeholder": "輸入一些假名",
"wikibase-diffview-reference": "參考文獻",
"wikibase-diffview-rank": "等級",
"wikibase-diffview-rank-preferred": "最佳等級",
@@ -86,6 +89,7 @@
"wikibase-aliases-input-help-message": "要該此項目易於搜尋,您可以輸入別名。",
"wikibase-aliases-empty": "尚未定義別名。",
"wikibase-propertypage-datatype": "資料型態",
+ "wikibase-propertypage-bad-datatype": "未知的數據型態: $1",
"wikibase-claimview-snak-tooltip": "請輸入屬性名稱為 \"$1\" 所對應的數值。
若該屬性沒有指定的數值或實際數值為未知,您可以點選數值輸入框旁的圖示來指定自訂數值替代。",
"wikibase-claimview-snak-new-tooltip":
"指定屬性後你可以輸入對應的數值。若該屬性沒有指定的數值或實際數值為未知,您可以點選數值輸入框旁的圖示來指定自訂數值替代。",
"wikibase-statementview-rank-preferred": "最佳等級",
@@ -113,6 +117,7 @@
"wikibase-validator-label-conflict": "特性 $3 已經有標籤 \"$1\" 關聯了語言代碼 $2。",
"wikibase-validator-label-with-description-conflict": "項目 $3 已有標籤
\"$1\" 關聯語言代碼 $2,使用相同的描述內容。",
"wikibase-validator-label-no-entityid": "此標籤必須不是一個有效的實體 ID。",
+ "wikibase-validator-no-such-media":
"文件\"$1\"在[https://commons.wikimedia.org/ Wikimedia Commons]中不存在",
"wikibase-itemlink-id-wrapper": "($1)",
"wikibase-wikibaserepopage-not-itemid": "''$1'' 不是一個有效的項目 ID。",
"wikibase-wikibaserepopage-invalid-langcode": "語言代碼 \"$1\" 不明。
請使用系統能夠辨識的語言代碼,如 \"en\"。",
@@ -124,12 +129,16 @@
"wikibase-itembytitle-lookup-site": "網站:",
"wikibase-itembytitle-lookup-page": "頁面:",
"wikibase-itembytitle-submit": "搜尋",
+ "wikibase-itembytitle-error-site": "請使用已存在的網站辨認器,例如\"enwiki\"就是英文維基百科。",
+ "wikibase-itembytitle-error-item": "找不到連結至的項目。",
"wikibase-itembytitle-create": "您也可以 [$1 建立項目]。",
+ "wikibase-itembytitle-summary": "Special:ItemByTitle 是用來尋找在連結網站中的對應項目。
<br />第一段,\"{{int:wikibase-itembytitle-lookup-site}}\",是輸入語言和網站代碼的地方。<br
/>而第二段,\"{{int:wikibase-itembytitle-lookup-page}}\",您必須輸入頁面的完整標題,因為這會顯示在連結到的網站上。",
"special-gotolinkedpage": "前往已連結的頁面",
"wikibase-gotolinkedpage-lookup-fieldset": "依網站與項目前往已連結的頁面",
"wikibase-gotolinkedpage-lookup-site": "網站:",
"wikibase-gotolinkedpage-lookup-item": "項目 ID:",
"wikibase-gotolinkedpage-submit": "執行",
+ "wikibase-gotolinkedpage-error-item-not-found": "沒有資料被搜尋到",
"special-itemdisambiguation": "項目消歧義",
"wikibase-itemdisambiguation-lookup-fieldset": "依語言和標籤搜尋項目",
"wikibase-itemdisambiguation-lookup-language": "語言代碼:",
@@ -321,6 +330,9 @@
"apihelp-wbcreateredirect-description": "建立實體重新導向。",
"apihelp-wbcreateredirect-param-to": "重新導向的實體 ID",
"apihelp-wbeditentity-example-9": "從項目 GUID
Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F 與
Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X 中移除主張",
+ "apihelp-wbeditentity-example-12": "移除一個標籤",
+ "apihelp-wbformatvalue-description": "格式化數據值。",
+ "apihelp-wbformatvalue-param-generate": "預期得輸出格式",
"apihelp-wbgetclaims-description": "取得 Wikibase 主張。",
"apihelp-wbgetclaims-param-entity": "用來取得主帳的實體 ID。 除非提供主張 GUID,否則為必填。",
"apihelp-wbgetclaims-param-rank": "選填的篩選條件,只回傳達到指定等級的主張",
diff --git a/extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php
b/extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php
index 687e06e..bf26946 100644
--- a/extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php
+++ b/extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php
@@ -53,7 +53,7 @@
/**
* @var DedupeBag
*/
- private $dedupBag;
+ private $dedupeBag;
/**
* Rdf builder for outputting labels for entity stubs.
@@ -89,7 +89,7 @@
* @param PropertyDataTypeLookup $propertyLookup
* @param int $flavor
* @param RdfWriter $writer
- * @param DedupeBag $dedupBag
+ * @param DedupeBag $dedupeBag
*/
public function __construct(
SiteList $sites,
@@ -98,14 +98,14 @@
PropertyDataTypeLookup $propertyLookup,
$flavor,
RdfWriter $writer,
- DedupeBag $dedupBag
+ DedupeBag $dedupeBag
) {
$this->vocabulary = $vocabulary;
$this->propertyLookup = $propertyLookup;
$this->valueSnakRdfBuilderFactory = $valueSnakRdfBuilderFactory;
$this->writer = $writer;
$this->produceWhat = $flavor;
- $this->dedupBag = $dedupBag ?: new HashBagOStuff();
+ $this->dedupeBag = $dedupeBag ?: new HashDedupeBag();
// XXX: move construction of sub-builders to a factory class.
$this->termsBuilder = new TermsRdfBuilder( $vocabulary, $writer
);
@@ -123,7 +123,7 @@
if ( $this->shouldProduce( RdfProducer::PRODUCE_SITELINKS ) ) {
$builder = new SiteLinksRdfBuilder( $vocabulary,
$writer, $sites );
// We can use the same bag since namespaces are
different
- $builder->setDedupeBag( $this->dedupBag );
+ $builder->setDedupeBag( $this->dedupeBag );
$this->builders[] = $builder;
}
}
@@ -139,14 +139,14 @@
$this->vocabulary,
$this->writer,
$this,
- $this->dedupBag
+ $this->dedupeBag
);
} else {
$statementValueBuilder =
$this->valueSnakRdfBuilderFactory->getSimpleValueSnakRdfBuilder(
$this->vocabulary,
$this->writer,
$this,
- $this->dedupBag
+ $this->dedupeBag
);
}
@@ -176,7 +176,7 @@
);
$builder = new FullStatementRdfBuilder( $this->vocabulary,
$this->writer, $snakBuilder );
- $builder->setDedupeBag( $this->dedupBag );
+ $builder->setDedupeBag( $this->dedupeBag );
$builder->setProduceQualifiers( $this->shouldProduce(
RdfProducer::PRODUCE_QUALIFIERS ) );
$builder->setProduceReferences( $this->shouldProduce(
RdfProducer::PRODUCE_REFERENCES ) );
diff --git a/extensions/WikimediaBadges/i18n/es.json
b/extensions/WikimediaBadges/i18n/es.json
new file mode 100644
index 0000000..98d5d0d
--- /dev/null
+++ b/extensions/WikimediaBadges/i18n/es.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Macofe"
+ ]
+ },
+ "wikimediabadges-desc": "Temas predeterminados para mostrar insignias
en los proyectos de Wikimedia"
+}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 0edbc7b..d518e1f 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -106,19 +106,19 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "b22e234f5ac32c31896db3e9157f421c72cbdb6b"
+ "reference": "0b293d628f589e147738e85e9ca0f71b1f60cc59"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/b22e234f5ac32c31896db3e9157f421c72cbdb6b",
- "reference": "b22e234f5ac32c31896db3e9157f421c72cbdb6b",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0b293d628f589e147738e85e9ca0f71b1f60cc59",
+ "reference": "0b293d628f589e147738e85e9ca0f71b1f60cc59",
"shasum": ""
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.5.1"
},
- "time": "2016-03-24 21:32:30",
+ "time": "2016-04-02 15:40:07",
"type": "mediawiki-extension",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@@ -1141,26 +1141,26 @@
},
{
"name": "data-values/geo",
- "version": "1.1.4",
- "version_normalized": "1.1.4.0",
+ "version": "1.1.6",
+ "version_normalized": "1.1.6.0",
"source": {
"type": "git",
"url": "https://github.com/DataValues/Geo.git",
- "reference": "e7222bc743ae05bfc5213cb1e20150aa772d8668"
+ "reference": "6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/DataValues/Geo/zipball/e7222bc743ae05bfc5213cb1e20150aa772d8668",
- "reference": "e7222bc743ae05bfc5213cb1e20150aa772d8668",
+ "url":
"https://api.github.com/repos/DataValues/Geo/zipball/6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48",
+ "reference": "6fb5f20c10e8d55ba5fa83a3bbcd824850ee9b48",
"shasum": ""
},
"require": {
- "data-values/common": "~0.1",
+ "data-values/common": "~0.3.0|~0.2.0",
"data-values/data-values": "~1.0|~0.1",
- "data-values/interfaces": "~0.1",
+ "data-values/interfaces": "~0.2.0|~0.1.5",
"php": ">=5.3.0"
},
- "time": "2014-11-25 16:48:57",
+ "time": "2016-04-01 22:49:09",
"type": "library",
"extra": {
"branch-alias": {
@@ -1274,12 +1274,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "8bbffed754354a1baba1ceb0db7c7661a6d8b778"
+ "reference": "d2b92bf9f7b50b8ca591e1c6b747541db10fdeae"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/8bbffed754354a1baba1ceb0db7c7661a6d8b778",
- "reference": "8bbffed754354a1baba1ceb0db7c7661a6d8b778",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/d2b92bf9f7b50b8ca591e1c6b747541db10fdeae",
+ "reference": "d2b92bf9f7b50b8ca591e1c6b747541db10fdeae",
"shasum": ""
},
"require": {
@@ -1311,7 +1311,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
},
- "time": "2016-03-30 20:43:32",
+ "time": "2016-04-02 18:20:18",
"type": "mediawiki-extension",
"installation-source": "dist",
"autoload": {
@@ -1361,12 +1361,12 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges",
- "reference": "c5eaaf4fa73409c1514b63ba96ace482c75f5d04"
+ "reference": "f226448d259013dcf74e0fb44e7d3dc7c20f738a"
},
"require": {
"php": ">=5.3.0"
},
- "time": "2016-03-27 19:26:46",
+ "time": "2016-04-01 20:31:20",
"type": "mediawiki-extension",
"installation-source": "source",
"autoload": {
@@ -1670,7 +1670,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality",
- "reference": "8da0396b18a17f1649c8010db903f925707dd8af"
+ "reference": "f5fd6b397c8c295a75600c9eab024c1071e946b7"
},
"require": {
"php": ">=5.3.0",
@@ -1687,7 +1687,7 @@
"satooshi/php-coveralls": "master-dev",
"wikibase/data-model-serialization": ">=0.1 <3.0"
},
- "time": "2016-03-22 16:14:25",
+ "time": "2016-04-02 12:50:20",
"type": "mediawiki-extension",
"installation-source": "source",
"autoload": {
diff --git a/vendor/data-values/geo/.travis.yml
b/vendor/data-values/geo/.travis.yml
index 29258a3..29da81f 100644
--- a/vendor/data-values/geo/.travis.yml
+++ b/vendor/data-values/geo/.travis.yml
@@ -5,6 +5,7 @@
- 5.4
- 5.5
- 5.6
+ - 7
- hhvm
before_script:
@@ -13,3 +14,6 @@
script:
- phpunit
+cache:
+ directories:
+ - $HOME/.composer/cache
diff --git a/vendor/data-values/geo/Geo.php b/vendor/data-values/geo/Geo.php
index 84f3d63..b053448 100644
--- a/vendor/data-values/geo/Geo.php
+++ b/vendor/data-values/geo/Geo.php
@@ -15,7 +15,7 @@
return 1;
}
-define( 'DATAVALUES_GEO_VERSION', '1.1.4' );
+define( 'DATAVALUES_GEO_VERSION', '1.1.6' );
if ( defined( 'MEDIAWIKI' ) ) {
$GLOBALS['wgExtensionCredits']['datavalues'][] = array(
diff --git a/vendor/data-values/geo/README.md b/vendor/data-values/geo/README.md
index a89be83..ff4e096 100644
--- a/vendor/data-values/geo/README.md
+++ b/vendor/data-values/geo/README.md
@@ -23,11 +23,11 @@
To add this package as a local, per-project dependency to your project, simply
add a
dependency on `data-values/geo` to your project's `composer.json` file.
Here is a minimal example of a `composer.json` file that just defines a
dependency on
-version 1.0 of this package:
+version 1.1 of this package:
{
"require": {
- "data-values/geo": "1.0.*"
+ "data-values/geo": "1.1.*"
}
}
@@ -92,6 +92,14 @@
[Semantic MediaWiki](https://semantic-mediawiki.org/) projects.
## Release notes
+
+### 1.1.6 (2016-04-02)
+
+* Added compatibility with DataValues Common 0.3.x
+
+### 1.1.5 (2015-12-28)
+
+* The component can now be installed together with DataValues Interfaces 0.2.x
### 1.1.4 (2014-11-25)
@@ -159,3 +167,4 @@
* [DataValues Geo on Packagist](https://packagist.org/packages/data-values/geo)
* [DataValues Geo on TravisCI](https://travis-ci.org/DataValues/Geo)
+* [DataValues on Wikimedia's
Phabricator](https://phabricator.wikimedia.org/project/view/122/)
diff --git a/vendor/data-values/geo/composer.json
b/vendor/data-values/geo/composer.json
index 7532cb1..9bd5cd8 100644
--- a/vendor/data-values/geo/composer.json
+++ b/vendor/data-values/geo/composer.json
@@ -31,8 +31,8 @@
"require": {
"php": ">=5.3.0",
"data-values/data-values": "~1.0|~0.1",
- "data-values/interfaces": "~0.1",
- "data-values/common": "~0.1"
+ "data-values/interfaces": "~0.2.0|~0.1.5",
+ "data-values/common": "~0.3.0|~0.2.0"
},
"autoload": {
"files" : [
diff --git a/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
b/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
index 0ee4909..e6ee65a 100644
--- a/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
+++ b/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
@@ -24,7 +24,8 @@
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
- * @author Adam Shorland
+ * @author Addshore
+ * @author Thiemo Mättig
*/
class GeoCoordinateFormatter extends ValueFormatterBase {
@@ -68,9 +69,9 @@
/**
* @since 0.1
*
- * @param FormatterOptions $options
+ * @param FormatterOptions|null $options
*/
- public function __construct( FormatterOptions $options ) {
+ public function __construct( FormatterOptions $options = null ) {
parent::__construct( $options );
$this->defaultOption( self::OPT_NORTH_SYMBOL, 'N' );
@@ -89,8 +90,8 @@
$this->defaultOption( self::OPT_SPACING_LEVEL, array(
self::OPT_SPACE_LATLONG,
self::OPT_SPACE_DIRECTION,
- self::OPT_SPACE_COORDPARTS )
- );
+ self::OPT_SPACE_COORDPARTS,
+ ) );
$this->defaultOption( self::OPT_PRECISION, 0 );
}
@@ -99,16 +100,14 @@
*
* Calls formatLatLongValue() using OPT_PRECISION for the $precision
parameter.
*
- * @since 0.1
+ * @param LatLongValue $value
*
- * @param LatLongValue $value The value to format
- *
- * @return string
+ * @return string Plain text
* @throws InvalidArgumentException
*/
public function format( $value ) {
if ( !( $value instanceof LatLongValue ) ) {
- throw new InvalidArgumentException( '$value must be a
LatLongValue' );
+ throw new InvalidArgumentException( 'Data value type
mismatch. Expected a LatLongValue.' );
}
$precision = $this->options->getOption( self::OPT_PRECISION );
@@ -124,11 +123,11 @@
* @param LatLongValue $value
* @param float $precision The desired precision, given as fractional
degrees.
*
- * @return string
+ * @return string Plain text
* @throws InvalidArgumentException
*/
public function formatLatLongValue( LatLongValue $value, $precision ) {
- if ( $precision <= 0 ) {
+ if ( $precision <= 0 || !is_finite( $precision ) ) {
$precision = 1 / 3600;
}
@@ -235,34 +234,32 @@
$degreeDigits = $this->getSignificantDigits( 1, $precision );
$stringDegrees = $this->formatNumber( $floatDegrees,
$degreeDigits );
- return $stringDegrees. $this->options->getOption(
self::OPT_DEGREE_SYMBOL );
+ return $stringDegrees . $this->options->getOption(
self::OPT_DEGREE_SYMBOL );
}
private function getInDegreeMinuteSecondFormat( $floatDegrees,
$precision ) {
- $options = $this->options;
-
$isNegative = $floatDegrees < 0;
$floatDegrees = abs( $floatDegrees );
- $degrees = floor( $floatDegrees );
- $minutes = floor( ( $floatDegrees - $degrees ) * 60 );
+ $degrees = (int)$floatDegrees;
+ $minutes = (int)( ( $floatDegrees - $degrees ) * 60 );
$seconds = ( $floatDegrees - ( $degrees + $minutes / 60 ) ) *
3600;
- $result = $this->formatNumber( $degrees, 0 )
- . $options->getOption( self::OPT_DEGREE_SYMBOL );
+ $result = $this->formatNumber( $degrees )
+ . $this->options->getOption( self::OPT_DEGREE_SYMBOL );
if ( $precision < 1 ) {
- $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
- . $this->formatNumber( $minutes, 0 )
- . $options->getOption( self::OPT_MINUTE_SYMBOL
);
+ $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
+ . $this->formatNumber( $minutes )
+ . $this->options->getOption(
self::OPT_MINUTE_SYMBOL );
}
if ( $precision < 1 / 60 ) {
$secondDigits = $this->getSignificantDigits( 60 * 60,
$precision );
- $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
+ $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
. $this->formatNumber( $seconds, $secondDigits )
- . $options->getOption( self::OPT_SECOND_SYMBOL
);
+ . $this->options->getOption(
self::OPT_SECOND_SYMBOL );
}
if ( $isNegative && ( $degrees + $minutes + $seconds ) > 0 ) {
@@ -273,23 +270,21 @@
}
private function getInDecimalMinuteFormat( $floatDegrees, $precision ) {
- $options = $this->options;
-
$isNegative = $floatDegrees < 0;
$floatDegrees = abs( $floatDegrees );
- $degrees = floor( $floatDegrees );
+ $degrees = (int)$floatDegrees;
$minutes = ( $floatDegrees - $degrees ) * 60;
- $result = $this->formatNumber( $degrees, 0 )
- . $options->getOption( self::OPT_DEGREE_SYMBOL );
+ $result = $this->formatNumber( $degrees )
+ . $this->options->getOption( self::OPT_DEGREE_SYMBOL );
if ( $precision < 1 ) {
$minuteDigits = $this->getSignificantDigits( 60,
$precision );
- $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
+ $result .= $this->getSpacing(
self::OPT_SPACE_COORDPARTS )
. $this->formatNumber( $minutes, $minuteDigits )
- . $options->getOption( self::OPT_MINUTE_SYMBOL
);
+ . $this->options->getOption(
self::OPT_MINUTE_SYMBOL );
}
if ( $isNegative && ( $degrees + $minutes ) > 0 ) {
@@ -308,32 +303,20 @@
* (resp. before, if the result is negative).
*/
private function getSignificantDigits( $unitsPerDegree,
$degreePrecision ) {
- $targetPrecision = $degreePrecision * $unitsPerDegree;
-
- $digits = ceil( -log10( $targetPrecision ) );
- return $digits;
+ return ceil( -log10( $unitsPerDegree * $degreePrecision ) );
}
/**
- * Formats a number.
- *
* @param float $number
* @param int $digits The number of digits after the decimal point.
- * If this is negative, $number is rounded and treated as an integer,
- * and the number will be padded with the appropriate number of zeros.
*
* @return string
*/
- private function formatNumber( $number, $digits ) {
+ private function formatNumber( $number, $digits = 0 ) {
//TODO: use NumberLocalizer
- if ( $digits > 0 ) {
- return sprintf( "%0.{$digits}F", $number );
- } elseif ( $digits < 0 ) {
- $digits = -$digits;
- return sprintf( "%{$digits}d", $number );
- } else {
- return sprintf( "%d", $number );
- }
+ return sprintf( $digits > 0
+ ? '%.' . (int)$digits . 'F'
+ : '%d', $number );
}
}
diff --git a/vendor/data-values/geo/src/Formatters/GlobeCoordinateFormatter.php
b/vendor/data-values/geo/src/Formatters/GlobeCoordinateFormatter.php
index 4afb7df..33bab93 100644
--- a/vendor/data-values/geo/src/Formatters/GlobeCoordinateFormatter.php
+++ b/vendor/data-values/geo/src/Formatters/GlobeCoordinateFormatter.php
@@ -25,16 +25,14 @@
/**
* @see ValueFormatter::format
*
- * @since 0.1
+ * @param GlobeCoordinateValue $value
*
- * @param GlobeCoordinateValue $value The value to format
- *
- * @return string
+ * @return string Plain text
* @throws InvalidArgumentException
*/
public function format( $value ) {
if ( !( $value instanceof GlobeCoordinateValue ) ) {
- throw new InvalidArgumentException( 'The
GlobeCoordinateFormatter can only format instances of GlobeCoordinateValue.' );
+ throw new InvalidArgumentException( 'Data value type
mismatch. Expected a GlobeCoordinateValue.' );
}
$formatter = new GeoCoordinateFormatter( $this->options );
diff --git a/vendor/data-values/geo/src/Parsers/GeoCoordinateParser.php
b/vendor/data-values/geo/src/Parsers/GeoCoordinateParser.php
index ef0f9c5..1d3c918 100644
--- a/vendor/data-values/geo/src/Parsers/GeoCoordinateParser.php
+++ b/vendor/data-values/geo/src/Parsers/GeoCoordinateParser.php
@@ -4,7 +4,6 @@
use DataValues\Geo\Values\GlobeCoordinateValue;
use ValueParsers\ParseException;
-use ValueParsers\ParserOptions;
use ValueParsers\StringValueParser;
/**
@@ -113,7 +112,7 @@
static $parser = null;
if ( $parser === null ) {
- $parser = new self( new ParserOptions() );
+ $parser = new self();
}
return $parser->parse( $string )->isValid();
diff --git a/vendor/data-values/geo/src/Parsers/GlobeCoordinateParser.php
b/vendor/data-values/geo/src/Parsers/GlobeCoordinateParser.php
index 5303ace..eb099b3 100644
--- a/vendor/data-values/geo/src/Parsers/GlobeCoordinateParser.php
+++ b/vendor/data-values/geo/src/Parsers/GlobeCoordinateParser.php
@@ -54,7 +54,7 @@
$latLong->getLongitude()
),
$this->detectPrecision( $latLong,
$precisionDetector ),
- $this->options->getOption( 'globe' )
+ $this->getOption( 'globe' )
);
} catch ( ParseException $parseException ) {
continue;
@@ -70,7 +70,7 @@
private function detectPrecision( LatLongValue $latLong,
$precisionDetector ) {
if ( $this->options->hasOption( 'precision' ) ) {
- return $this->options->getOption( 'precision' );
+ return $this->getOption( 'precision' );
}
return min(
diff --git a/vendor/data-values/geo/src/Values/GlobeCoordinateValue.php
b/vendor/data-values/geo/src/Values/GlobeCoordinateValue.php
index 8e4c231..570f74b 100644
--- a/vendor/data-values/geo/src/Values/GlobeCoordinateValue.php
+++ b/vendor/data-values/geo/src/Values/GlobeCoordinateValue.php
@@ -82,17 +82,11 @@
*
* @param string $value
*
- * @return GlobeCoordinateValue
* @throws IllegalValueException
*/
public function unserialize( $value ) {
list( $latitude, $longitude, $altitude, $precision, $globe ) =
json_decode( $value );
-
- $this->__construct(
- new LatLongValue( $latitude, $longitude ),
- $precision,
- $globe
- );
+ $this->__construct( new LatLongValue( $latitude, $longitude ),
$precision, $globe );
}
/**
diff --git a/vendor/data-values/geo/src/Values/LatLongValue.php
b/vendor/data-values/geo/src/Values/LatLongValue.php
index bc82afc..769c61c 100644
--- a/vendor/data-values/geo/src/Values/LatLongValue.php
+++ b/vendor/data-values/geo/src/Values/LatLongValue.php
@@ -104,7 +104,6 @@
*
* @param string $value
*
- * @return LatLongValue
* @throws InvalidArgumentException
*/
public function unserialize( $value ) {
@@ -114,10 +113,7 @@
throw new InvalidArgumentException( 'Invalid
serialization provided in ' . __METHOD__ );
}
- $this->__construct(
- (float)$data[0],
- (float)$data[1]
- );
+ $this->__construct( (float)$data[0], (float)$data[1] );
}
/**
diff --git a/vendor/data-values/geo/tests/bootstrap.php
b/vendor/data-values/geo/tests/bootstrap.php
index 2b1b24a..ac82d46 100644
--- a/vendor/data-values/geo/tests/bootstrap.php
+++ b/vendor/data-values/geo/tests/bootstrap.php
@@ -11,4 +11,4 @@
die( 'You need to install this package with Composer before you can run
the tests' );
}
-$autoLoader = require_once( __DIR__ . '/../vendor/autoload.php' );
+require_once __DIR__ . '/../vendor/autoload.php';
diff --git
a/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
b/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
index ac988f9..58e1a74 100644
---
a/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
+++
b/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
@@ -16,7 +16,7 @@
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
- * @author Adam Shorland
+ * @author Addshore
* @author Daniel Kinzler
*/
class GeoCoordinateFormatterTest extends \PHPUnit_Framework_TestCase {
@@ -81,7 +81,7 @@
/**
* @dataProvider floatNotationProvider
*/
- public function testFloatNotationRoundTrip( LatLongValue $value,
$precision, $expected ) {
+ public function testFloatNotationRoundTrip( LatLongValue $value,
$precision, $expected ) {
$options = $this->makeOptions(
GeoCoordinateFormatter::TYPE_FLOAT, $precision );
$this->assertRoundTrip( $value, $options );
}
@@ -316,7 +316,7 @@
);
}
- private function assertRoundTrip( LatLongValue $value, FormatterOptions
$options ) {
+ private function assertRoundTrip( LatLongValue $value, FormatterOptions
$options ) {
$formatter = new GeoCoordinateFormatter( $options );
$parser = new GeoCoordinateParser();
@@ -370,7 +370,7 @@
private function provideSpacingLevelOptions() {
return array(
- 'none' => array( ),
+ 'none' => array(),
'latlong' => array(
GeoCoordinateFormatter::OPT_SPACE_LATLONG ),
'direction' => array(
GeoCoordinateFormatter::OPT_SPACE_DIRECTION ),
'coordparts' => array(
GeoCoordinateFormatter::OPT_SPACE_COORDPARTS ),
@@ -513,6 +513,8 @@
array( '' ),
array( 0 ),
array( -1 ),
+ array( NAN ),
+ array( INF ),
);
}
diff --git
a/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
b/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
index 0b54c65..318ba9e 100644
---
a/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
+++
b/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
@@ -23,11 +23,25 @@
class GlobeCoordinateFormatterTest extends ValueFormatterTestBase {
/**
+ * @deprecated since 0.2, just use getInstance.
+ */
+ protected function getFormatterClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueFormatterTestBase::getInstance
+ *
+ * @param FormatterOptions|null $options
+ *
+ * @return GlobeCoordinateFormatter
+ */
+ protected function getInstance( FormatterOptions $options = null ) {
+ return new GlobeCoordinateFormatter( $options );
+ }
+
+ /**
* @see ValueFormatterTestBase::validProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validProvider() {
$floats = array(
@@ -98,17 +112,6 @@
return $argLists;
}
- /**
- * @see ValueFormatterTestBase::getFormatterClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getFormatterClass() {
- return 'DataValues\Geo\Formatters\GlobeCoordinateFormatter';
- }
-
public function
testFormatWithInvalidPrecision_fallsBackToDefaultPrecision() {
$options = new FormatterOptions();
$options->setOption( GeoCoordinateFormatter::OPT_PRECISION, 0 );
@@ -122,7 +125,7 @@
* @dataProvider validProvider
*/
public function testFormatterRoundTrip( GlobeCoordinateValue $coord,
$expectedValue, FormatterOptions $options ) {
- $formatter = $this->getInstance( $options );
+ $formatter = new GlobeCoordinateFormatter( $options );
$parser = new GlobeCoordinateParser(
new ParserOptions( array( 'precision' =>
$coord->getPrecision() ) )
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
index 6fb872f..97d4b17 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
@@ -2,6 +2,7 @@
namespace Tests\DataValues\Geo\Parsers;
+use DataValues\Geo\Parsers\DdCoordinateParser;
use DataValues\Geo\Values\LatLongValue;
use ValueParsers\Test\StringValueParserTest;
@@ -18,11 +19,23 @@
class DdCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return DdCoordinateParser
+ */
+ protected function getInstance() {
+ return new DdCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -58,6 +71,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -71,17 +87,6 @@
}
return $argLists;
- }
-
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\DdCoordinateParser';
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
index 72dee2d..5d70e00 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
@@ -2,6 +2,7 @@
namespace Tests\DataValues\Geo\Parsers;
+use DataValues\Geo\Parsers\DmCoordinateParser;
use DataValues\Geo\Values\LatLongValue;
use ValueParsers\Test\StringValueParserTest;
@@ -18,11 +19,23 @@
class DmCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return DmCoordinateParser
+ */
+ protected function getInstance() {
+ return new DmCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -58,6 +71,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -71,17 +87,6 @@
}
return $argLists;
- }
-
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\DmCoordinateParser';
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
index cb0e0c6..5a0d1e1 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
@@ -2,6 +2,7 @@
namespace Tests\DataValues\Geo\Parsers;
+use DataValues\Geo\Parsers\DmsCoordinateParser;
use DataValues\Geo\Values\LatLongValue;
use ValueParsers\Test\StringValueParserTest;
@@ -18,11 +19,23 @@
class DmsCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return DmsCoordinateParser
+ */
+ protected function getInstance() {
+ return new DmsCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -61,6 +74,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -74,17 +90,6 @@
}
return $argLists;
- }
-
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\DmsCoordinateParser';
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
index f31fc62..d609b52 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
@@ -2,6 +2,7 @@
namespace Tests\DataValues\Geo\Parsers;
+use DataValues\Geo\Parsers\FloatCoordinateParser;
use DataValues\Geo\Values\LatLongValue;
use ValueParsers\Test\StringValueParserTest;
@@ -18,11 +19,23 @@
class FloatCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return FloatCoordinateParser
+ */
+ protected function getInstance() {
+ return new FloatCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -60,6 +73,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -73,17 +89,6 @@
}
return $argLists;
- }
-
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\FloatCoordinateParser';
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
index 90a4bc7..9aca636 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
@@ -2,6 +2,7 @@
namespace Tests\DataValues\Geo\Parsers;
+use DataValues\Geo\Parsers\GeoCoordinateParser;
use DataValues\Geo\Values\LatLongValue;
use ValueParsers\Test\StringValueParserTest;
@@ -18,11 +19,23 @@
class GeoCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return GeoCoordinateParser
+ */
+ protected function getInstance() {
+ return new GeoCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -93,6 +106,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -106,17 +122,6 @@
}
return $argLists;
- }
-
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\GeoCoordinateParser';
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
index a85e4c6..5779bed 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
@@ -22,11 +22,23 @@
class GlobeCoordinateParserTest extends StringValueParserTest {
/**
+ * @deprecated since 0.3, just use getInstance.
+ */
+ protected function getParserClass() {
+ throw new \LogicException( 'Should not be called, use
getInstance' );
+ }
+
+ /**
+ * @see ValueParserTestBase::getInstance
+ *
+ * @return GlobeCoordinateParser
+ */
+ protected function getInstance() {
+ return new GlobeCoordinateParser();
+ }
+
+ /**
* @see ValueParserTestBase::validInputProvider
- *
- * @since 0.1
- *
- * @return array
*/
public function validInputProvider() {
$argLists = array();
@@ -111,6 +123,9 @@
return $argLists;
}
+ /**
+ * @see StringValueParserTest::invalidInputProvider
+ */
public function invalidInputProvider() {
$argLists = parent::invalidInputProvider();
@@ -130,7 +145,7 @@
* @dataProvider withGlobeOptionProvider
*/
public function testWithGlobeOption( $expected, $value, $options = null
) {
- $parser = $this->getInstance();
+ $parser = new GlobeCoordinateParser();
if ( $options ) {
$parserOptions = new ParserOptions( json_decode(
$options, true ) );
@@ -179,12 +194,9 @@
/**
* @dataProvider precisionDetectionProvider
- * @param string $value
- * @param float|int $expected
*/
public function testPrecisionDetection( $value, $expected ) {
$parser = new GlobeCoordinateParser();
- /** @var GlobeCoordinateValue $globeCoordinateValue */
$globeCoordinateValue = $parser->parse( $value );
$this->assertSame( $expected,
$globeCoordinateValue->getPrecision() );
@@ -248,18 +260,13 @@
array( '1°3\'5.0001" 2°4\'6.0001"', 1 / 36000000 ),
array( '1°3\'5.00001" 2°4\'6.00001"', 1 / 3600 ),
array( '1°3\'5.55555" 2°4\'6.55555"', 1 / 36000000 ),
- );
- }
- /**
- * @see ValueParserTestBase::getParserClass
- *
- * @since 0.1
- *
- * @return string
- */
- protected function getParserClass() {
- return 'DataValues\Geo\Parsers\GlobeCoordinateParser';
+ /**
+ * @fixme What do the users expect in this case, 1/3600
or 1/360000?
+ * @see
https://bugzilla.wikimedia.org/show_bug.cgi?id=64820
+ */
+ array( '47°42\'0.00"N, 15°27\'0.00"E', 1 / 3600 ),
+ );
}
}
diff --git
a/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
b/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
index 3de3b32..a5a2f60 100644
--- a/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
+++ b/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
@@ -20,8 +20,6 @@
/**
* @see DataValueTest::getClass
*
- * @since 0.1
- *
* @return string
*/
public function getClass() {
diff --git a/vendor/data-values/geo/tests/unit/Values/LatLongValueTest.php
b/vendor/data-values/geo/tests/unit/Values/LatLongValueTest.php
index 23ab56d..d4c9477 100644
--- a/vendor/data-values/geo/tests/unit/Values/LatLongValueTest.php
+++ b/vendor/data-values/geo/tests/unit/Values/LatLongValueTest.php
@@ -19,8 +19,6 @@
/**
* @see DataValueTest::getClass
*
- * @since 0.1
- *
* @return string
*/
public function getClass() {
--
To view, visit https://gerrit.wikimedia.org/r/281281
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib87e1e0810dd1f9a19cd7f1937c4710d443bb289
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits