WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/325907 )

Change subject: New Wikidata Build - 2016-12-08T10:00:01+0000
......................................................................

New Wikidata Build - 2016-12-08T10:00:01+0000

Change-Id: Ie6044894dcfb19ef3b9b22da938a2ca2cbace948
---
M composer.lock
M extensions/Wikibase/client/i18n/en.json
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
M extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php
M extensions/Wikibase/repo/Wikibase.i18n.namespaces.php
M extensions/Wikibase/repo/config/Wikibase.example.php
M extensions/Wikibase/repo/includes/Specials/SpecialGoToLinkedPage.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php
M vendor/composer/installed.json
9 files changed, 28 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/07/325907/1

diff --git a/composer.lock b/composer.lock
index a183cab..0d7ba6a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1585,12 +1585,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "67bc67880b7068b2179d7ffd88126826f620a328"
+                "reference": "957d11c178b11d53a8cdabd0e31cfa741fe37109"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/67bc67880b7068b2179d7ffd88126826f620a328";,
-                "reference": "67bc67880b7068b2179d7ffd88126826f620a328",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/957d11c178b11d53a8cdabd0e31cfa741fe37109";,
+                "reference": "957d11c178b11d53a8cdabd0e31cfa741fe37109",
                 "shasum": ""
             },
             "require": {
@@ -1662,7 +1662,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2016-12-06 21:48:47"
+            "time": "2016-12-07 21:24:57"
         },
         {
             "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/en.json 
b/extensions/Wikibase/client/i18n/en.json
index 0e5f82f..8642307 100644
--- a/extensions/Wikibase/client/i18n/en.json
+++ b/extensions/Wikibase/client/i18n/en.json
@@ -91,7 +91,7 @@
        "wikibase-pageswithbadges-legend": "List of pages with a given badge",
        "wikibase-pageswithbadges-badge": "Badge:",
        "wikibase-pageswithbadges-submit": "Show pages",
-       "entityusage": "Entity Usage",
+       "entityusage": "Entity usage",
        "entityusage-summary": "This page lists pages that use the given entity 
(e.g. Q42). The list is sorted by descending page ID, so that newer pages are 
listed first.",
        "wikibase-entityusage-invalid-id": "$1 is not a valid entity ID",
        "wikibase-entityusage-legend": "List of pages that use a given entity",
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
index 224eac1..b34986d 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
+++ 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Client\DataAccess\PropertyParserFunction;
 
 use Language;
-use MWException;
 use Parser;
 use Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory;
 use Wikibase\Client\DataAccess\PropertyIdResolver;
@@ -102,7 +101,6 @@
         * @param UsageAccumulator $usageAccumulator
         *
         * @return LanguageAwareRenderer
-        * @throws MWException
         */
        private function newLanguageAwareRenderer(
                $type,
diff --git 
a/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php 
b/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php
index 21a4262..28dd660 100644
--- a/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php
+++ b/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php
@@ -46,7 +46,7 @@
                        throw $ex;
                } catch ( \Exception $ex ) {
                        // TODO: catch more specific exception once 
EntityRevisionLookup contract gets clarified
-                       throw new EntityLookupException( $entityId, null, $ex );
+                       throw new EntityLookupException( $entityId, 
$ex->getMessage(), $ex );
                }
 
                return $revision === null ? null : $revision->getEntity();
@@ -67,7 +67,7 @@
                        throw $ex;
                } catch ( \Exception $ex ) {
                        // TODO: catch more specific exception once 
EntityRevisionLookup contract gets clarified
-                       throw new EntityLookupException( $entityId, null, $ex );
+                       throw new EntityLookupException( $entityId, 
$ex->getMessage(), $ex );
                }
        }
 
diff --git a/extensions/Wikibase/repo/Wikibase.i18n.namespaces.php 
b/extensions/Wikibase/repo/Wikibase.i18n.namespaces.php
index efbee1d..628942f 100644
--- a/extensions/Wikibase/repo/Wikibase.i18n.namespaces.php
+++ b/extensions/Wikibase/repo/Wikibase.i18n.namespaces.php
@@ -16,7 +16,6 @@
 // In effect this means that namespace translations apply only if the user 
defined the corresponding
 // namespace constant.
 $namespaceConstants = array(
-       'WB_NS_DATA',     'WB_NS_DATA_TALK',  // legacy
        'WB_NS_ITEM',     'WB_NS_ITEM_TALK',
        'WB_NS_PROPERTY', 'WB_NS_PROPERTY_TALK',
        'WB_NS_QUERY',    'WB_NS_QUERY_TALK',
@@ -37,9 +36,6 @@
 $namespaceNames = array();
 
 $namespaceNames['en'] = array(
-       WB_NS_DATA      => 'Data',      // legacy
-       WB_NS_DATA_TALK => 'Data_talk', // legacy
-
        WB_NS_ITEM      => 'Item',
        WB_NS_ITEM_TALK => 'Item_talk',
 
@@ -51,9 +47,6 @@
 );
 
 $namespaceNames['be-tarask'] = array(
-       WB_NS_DATA      => 'Зьвесткі',      // legacy
-       WB_NS_DATA_TALK => 'Абмеркаваньне_зьвестак', // legacy
-
        WB_NS_ITEM      => 'Аб’ект',
        WB_NS_ITEM_TALK => 'Абмеркаваньне_аб’екта',
 
@@ -65,9 +58,6 @@
 );
 
 $namespaceNames['cs'] = array(
-       WB_NS_DATA      => 'Data',           // legacy
-       WB_NS_DATA_TALK => 'Diskuse k datům', // legacy
-
        WB_NS_ITEM      => 'Položka',
        WB_NS_ITEM_TALK => 'Diskuse k položce',
 
@@ -79,9 +69,6 @@
 );
 
 $namespaceNames['de'] = array(
-       WB_NS_DATA      => 'Daten',           // legacy
-       WB_NS_DATA_TALK => 'Datendiskussion', // legacy
-
        WB_NS_ITEM      => 'Thema',
        WB_NS_ITEM_TALK => 'Themendiskussion',
 
@@ -93,9 +80,6 @@
 );
 
 $namespaceNames['he'] = array(
-       WB_NS_DATA      => 'נתונים',      // legacy
-       WB_NS_DATA_TALK => 'שיחת_נתונים', // legacy
-
        WB_NS_ITEM      => 'פריט',
        WB_NS_ITEM_TALK => 'שיחת_פריט',
 
@@ -107,9 +91,6 @@
 );
 
 $namespaceNames['it'] = array(
-       WB_NS_DATA      => 'Dati',             // legacy
-       WB_NS_DATA_TALK => 'Discussioni_dati', // legacy
-
        WB_NS_ITEM      => 'Elemento',
        WB_NS_ITEM_TALK => 'Discussioni_elemento',
 
@@ -132,9 +113,6 @@
 );
 
 $namespaceNames['ru'] = array(
-       WB_NS_DATA      => 'Данные',            // legacy
-       WB_NS_DATA_TALK => 'Обсуждение_данных', // legacy
-
        WB_NS_ITEM      => 'Предмет',
        WB_NS_ITEM_TALK => 'Обсуждение_предмета',
 
@@ -146,9 +124,6 @@
 );
 
 $namespaceNames['vi'] = array(
-       WB_NS_DATA      => 'Dữ_liệu',           // legacy
-       WB_NS_DATA_TALK => 'Thảo_luận_Dữ_liệu', // legacy
-
        WB_NS_ITEM      => 'Khoản_mục',
        WB_NS_ITEM_TALK => 'Thảo_luận_Khoản_mục',
 
diff --git a/extensions/Wikibase/repo/config/Wikibase.example.php 
b/extensions/Wikibase/repo/config/Wikibase.example.php
index 0173ac4..d4a436f 100644
--- a/extensions/Wikibase/repo/config/Wikibase.example.php
+++ b/extensions/Wikibase/repo/config/Wikibase.example.php
@@ -79,8 +79,6 @@
 // NOTE: do *not* define WB_NS_ITEM and WB_NS_ITEM_TALK when using a core 
namespace for items!
 define( 'WB_NS_PROPERTY', $baseNs +2 );
 define( 'WB_NS_PROPERTY_TALK', $baseNs +3 );
-define( 'WB_NS_QUERY', $baseNs +4 );
-define( 'WB_NS_QUERY_TALK', $baseNs +5 );
 
 // You can set up an alias for the main namespace, if you like.
 //$wgNamespaceAliases['Item'] = NS_MAIN;
@@ -89,8 +87,6 @@
 // No extra namespace for items, using a core namespace for that.
 $wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
 $wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
-$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
-$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
 
 // Tell Wikibase which namespace to use for which kind of entity
 $wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN; // <=== Use main 
namespace for items!!!
diff --git 
a/extensions/Wikibase/repo/includes/Specials/SpecialGoToLinkedPage.php 
b/extensions/Wikibase/repo/includes/Specials/SpecialGoToLinkedPage.php
index e103127..64fc3d2 100644
--- a/extensions/Wikibase/repo/includes/Specials/SpecialGoToLinkedPage.php
+++ b/extensions/Wikibase/repo/includes/Specials/SpecialGoToLinkedPage.php
@@ -3,12 +3,12 @@
 namespace Wikibase\Repo\Specials;
 
 use HTMLForm;
-use InvalidArgumentException;
 use SiteStore;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Services\Lookup\EntityLookup;
+use Wikibase\DataModel\Services\Lookup\EntityLookupException;
 use Wikibase\DataModel\Services\Lookup\EntityRedirectLookup;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\Repo\WikibaseRepo;
@@ -156,17 +156,16 @@
        private function getItemId( $itemString ) {
                try {
                        $itemId = $this->idParser->parse( $itemString );
-                       if ( $itemId instanceof ItemId ) {
-                               if ( !$this->entityLookup->hasEntity( $itemId ) 
) {
-                                       $this->errorMessageKey = 
"item-not-found";
-                                       return null;
-                               }
+
+                       if ( $itemId instanceof ItemId && 
$this->entityLookup->hasEntity( $itemId ) ) {
                                return $itemId;
                        }
+
+                       $this->errorMessageKey = 'item-not-found';
                } catch ( EntityIdParsingException $e ) {
                        $this->errorMessageKey = 'item-id-invalid';
-               } catch ( InvalidArgumentException $e ) {
-                       $this->errorMessageKey = 'item-id-invalid';
+               } catch ( EntityLookupException $e ) {
+                       $this->errorMessageKey = 'item-not-found';
                }
 
                return null;
@@ -245,7 +244,7 @@
                        )
                );
 
-               HTMLForm::factory( 'inline', $formDescriptor, 
$this->getContext() )
+               HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() 
)
                        ->setId( 'wb-gotolinkedpage-form1' )
                        ->setMethod( 'get' )
                        ->setSubmitID( 'wb-gotolinkedpage-submit' )
diff --git 
a/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php
 
b/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php
index 3f73d42..0b892a1 100644
--- 
a/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php
+++ 
b/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php
@@ -3,9 +3,11 @@
 namespace Wikibase\Repo\Tests\Specials;
 
 use FauxResponse;
+use InvalidArgumentException;
 use Site;
 use SiteStore;
 use SpecialPageTestBase;
+use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\DataModel\Services\Lookup\EntityLookup;
@@ -95,7 +97,11 @@
                $mock->expects( $this->any() )
                        ->method( 'parse' )
                        ->will( $this->returnCallback( function( $itemString ) {
+                               try {
                                        return new ItemId( $itemString );
+                               } catch ( InvalidArgumentException $ex ) {
+                                       throw new EntityIdParsingException();
+                               }
                        } ) );
 
                return $mock;
@@ -104,7 +110,7 @@
        /**
         * @return EntityLookup
         */
-       private function getEntitylookup() {
+       private function getEntityLookup() {
                $mock = $this->getMock( EntityLookup::class );
                $mock->expects( $this->any() )
                        ->method( 'hasEntity' )
@@ -127,7 +133,7 @@
                        $this->getMockSiteLinkLookup(),
                        $this->getEntityRedirectLookup(),
                        $this->getEntityIdParser(),
-                       $this->getEntitylookup()
+                       $this->getEntityLookup()
                );
 
                return $page;
@@ -164,23 +170,19 @@
                $matchers['site'] = array(
                        'tag' => 'input',
                        'attributes' => array(
-                               'id' => 'wb-gotolinkedpage-sitename',
                                'name' => 'site',
                                'value' => $site
                        ) );
                $matchers['itemid'] = array(
                        'tag' => 'input',
                        'attributes' => array(
-                               'id' => 'wb-gotolinkedpage-itemid',
                                'name' => 'itemid',
                                'value' => $item
                        ) );
                $matchers['submit'] = array(
-                       'tag' => 'input',
+                       'tag' => 'button',
                        'attributes' => array(
-                               'id' => 'wb-gotolinkedpage-submit',
                                'type' => 'submit',
-                               'name' => ''
                        )
                );
                foreach ( $matchers as $key => $matcher ) {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 9c5aeb6..982e74d 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1406,12 +1406,12 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "67bc67880b7068b2179d7ffd88126826f620a328"
+            "reference": "957d11c178b11d53a8cdabd0e31cfa741fe37109"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/67bc67880b7068b2179d7ffd88126826f620a328";,
-            "reference": "67bc67880b7068b2179d7ffd88126826f620a328",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/957d11c178b11d53a8cdabd0e31cfa741fe37109";,
+            "reference": "957d11c178b11d53a8cdabd0e31cfa741fe37109",
             "shasum": ""
         },
         "require": {
@@ -1444,7 +1444,7 @@
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
         },
-        "time": "2016-12-06 21:48:47",
+        "time": "2016-12-07 21:24:57",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6044894dcfb19ef3b9b22da938a2ca2cbace948
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <wikidata-servi...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to