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

Change subject: New Wikidata Build - 2016-10-16T10:00:01+0000
......................................................................


New Wikidata Build - 2016-10-16T10:00:01+0000

Change-Id: I852ac036cd98ea0687f9f258d1e6b910bae140fa
---
M composer.lock
M extensions/ValueView/RELEASE-NOTES.md
M extensions/ValueView/ValueView.php
M extensions/ValueView/i18n/en.json
M extensions/ValueView/i18n/qqq.json
M extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
M extensions/ValueView/src/experts/GlobeCoordinateInput.js
M extensions/ValueView/src/experts/resources.php
M extensions/ValueView/src/jquery.valueview.valueview.js
A extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js
M extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
M extensions/ValueView/tests/lib/resources.php
M extensions/Wikibase/client/i18n/diq.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/sd.json
M extensions/Wikibase/client/i18n/vro.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
M extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/lb.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/pt.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/sd.json
M extensions/Wikibase/repo/i18n/sv.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
M 
extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
M extensions/Wikibase/view/resources/jquery/wikibase/resources.php
M vendor/composer/installed.json
38 files changed, 464 insertions(+), 78 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.lock b/composer.lock
index 9cadb17..831f29f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -674,16 +674,16 @@
         },
         {
             "name": "data-values/value-view",
-            "version": "0.17.4",
+            "version": "0.18.0",
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/data-values-value-view.git";,
-                "reference": "094a35216990d62daf104037edd3d593d406d80d"
+                "reference": "5938027bbbad63e54cfa0266db211bac5fa902b2"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/094a35216990d62daf104037edd3d593d406d80d";,
-                "reference": "094a35216990d62daf104037edd3d593d406d80d",
+                "url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/5938027bbbad63e54cfa0266db211bac5fa902b2";,
+                "reference": "5938027bbbad63e54cfa0266db211bac5fa902b2",
                 "shasum": ""
             },
             "require": {
@@ -721,7 +721,7 @@
             ],
             "description": "Provides JS widgets to edit values defined by the 
DataValues library",
             "homepage": "https://www.mediawiki.org/wiki/Extension:ValueView";,
-            "time": "2016-10-05 14:27:34"
+            "time": "2016-10-14 12:19:21"
         },
         {
             "name": "diff/diff",
@@ -1574,12 +1574,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "7f7a926567984089c1c157da35f19260d18bd7c9"
+                "reference": "a306d01a8be6e9648bef0506cc39772ab48311b2"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7a926567984089c1c157da35f19260d18bd7c9";,
-                "reference": "7f7a926567984089c1c157da35f19260d18bd7c9",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a306d01a8be6e9648bef0506cc39772ab48311b2";,
+                "reference": "a306d01a8be6e9648bef0506cc39772ab48311b2",
                 "shasum": ""
             },
             "require": {
@@ -1593,7 +1593,7 @@
                 "data-values/serialization": "~1.1",
                 "data-values/time": "~0.8.4",
                 "data-values/validators": "~0.1.0",
-                "data-values/value-view": "~0.17.3",
+                "data-values/value-view": "~0.18.0",
                 "diff/diff": "~2.0",
                 "php": ">=5.5.0",
                 "wikibase/data-model": "~6.1",
@@ -1653,7 +1653,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2016-10-13 08:27:02"
+            "time": "2016-10-15 21:10:42"
         },
         {
             "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ValueView/RELEASE-NOTES.md 
b/extensions/ValueView/RELEASE-NOTES.md
index 26b0f6b..2e273c6 100644
--- a/extensions/ValueView/RELEASE-NOTES.md
+++ b/extensions/ValueView/RELEASE-NOTES.md
@@ -1,5 +1,9 @@
 # ValueView release notes
 
+## 0.18.0 (2016-10-14)
+* `jQuery.ui.commonssuggester` now allows pasting full and partial Wikimedia 
Commons URLs.
+* Added support for `null` precision to `GlobeCoordinateInput`.
+
 ## 0.17.4 (2016-10-05)
 * Handle null upstream values in 
`jQuery.valueview.ExpertExtender.LanguageSelector::onInitialShow`.
 * Properly forward API error messages in `jquery.ui.unitsuggester`.
diff --git a/extensions/ValueView/ValueView.php 
b/extensions/ValueView/ValueView.php
index 9a472b4..cc535df 100644
--- a/extensions/ValueView/ValueView.php
+++ b/extensions/ValueView/ValueView.php
@@ -5,7 +5,7 @@
        return 1;
 }
 
-define( 'VALUEVIEW_VERSION', '0.17.4' );
+define( 'VALUEVIEW_VERSION', '0.18.0' );
 
 // Include the composer autoloader if it is present.
 if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
diff --git a/extensions/ValueView/i18n/en.json 
b/extensions/ValueView/i18n/en.json
index e18bf3b..5200c8f 100644
--- a/extensions/ValueView/i18n/en.json
+++ b/extensions/ValueView/i18n/en.json
@@ -11,6 +11,7 @@
        "valueview-expert-unsupportedvalue-unsupporteddatatype": "Handling of 
values for \"$1\" data type is not yet supported.",
        "valueview-expert-emptyvalue-empty": "empty",
        "valueview-expert-globecoordinateinput-precision": "Precision:",
+       "valueview-expert-globecoordinateinput-nullprecision": "unspecified",
        "valueview-expert-globecoordinateinput-customprecision": "special ($1)",
        "valueview-expert-timevalue-calendar-gregorian": "Gregorian",
        "valueview-expert-timevalue-calendar-julian": "Julian",
diff --git a/extensions/ValueView/i18n/qqq.json 
b/extensions/ValueView/i18n/qqq.json
index ca40add..cc135ff 100644
--- a/extensions/ValueView/i18n/qqq.json
+++ b/extensions/ValueView/i18n/qqq.json
@@ -15,11 +15,16 @@
        "valueview-expert-unsupportedvalue-unsupporteddatatype": "Error shown 
if a data value for a certain data type (see [[d:Wikidata:Glossary]]) should be 
displayed or a form for creating one should be offered while this is not yet 
possible from a technical point of view (e.g. because a valueview widget expert 
handling data values for that data type has not yet been 
implemented).\n\nParameters:\n* $1 - the name of the data type which lacks 
support",
        "valueview-expert-emptyvalue-empty": "Message expressing that there is 
currently no value set in a jQuery valueview.\n{{Identical|Empty}}",
        "valueview-expert-globecoordinateinput-precision": "Label for the user 
interface element used to set a specific precision (e.g. 1, 0.1, 0.001) when 
entering a coordinate value.\n{{Identical|Precision}}",
-       "valueview-expert-globecoordinateinput-customprecision": 
"{{Identical|Special}}",
-       "valueview-expert-timevalue-calendar-gregorian": "Label of the 
GREGORIAN calendar. The label is used for selecting the GREGORIAN calendar 
model when entering a date and is displayed with dates that refer to that 
calendar model.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-gregorian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-gregorian}}",
-       "valueview-expert-timevalue-calendar-julian": "Label of the JULIAN 
calendar. The label is used for selecting the JULIAN calendar model when 
entering a date and is displayed with dates that refer to that calendar 
model.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-julian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-julian}}",
+       "valueview-expert-globecoordinateinput-nullprecision": "Label 
describing the meaning of the coordinate precision \"null\". Usually it means 
there was no precision specified when the value was entered, other than the 
precision that can be guessed based on the number of fractional digits of the 
latitude and longitude values.",
+       "valueview-expert-globecoordinateinput-customprecision": "Label 
wrapping a custom precision the user can not select when entering 
coordinates.\n\nParameters\n* $1 - the precision value as a decimal 
number\n{{Identical|Special}}",
+       "valueview-expert-timevalue-calendar-gregorian": "Label of the 
GREGORIAN calendar. The label is used for selecting the GREGORIAN calendar 
model when entering a date and is displayed with dates that refer to that 
calendar model.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-gregorian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-gregorian}}\n{{Identical|Gregorian}}",
+       "valueview-expert-timevalue-calendar-julian": "Label of the JULIAN 
calendar. The label is used for selecting the JULIAN calendar model when 
entering a date and is displayed with dates that refer to that calendar 
model.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-julian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-julian}}\n{{Identical|Julian}}",
        "valueview-expert-timeinput-precision": "Label for the user interface 
element used to set a specific precision (e.g. hour, day, month, year) when 
entering a time value.\n{{Identical|Precision}}",
        "valueview-expert-timeinput-calendar": "Label for the user interface 
element used to select a specific calendar (e.g. Gregorian, Julian) entering a 
time value.\n\nThe calendar is not localized at this 
time.\n{{Identical|Calendar}}",
+       "valueview-expertextender-calendarhint-gregorian": "Message informing 
that the GREGORIAN calendar has been detected automatically while specifying a 
date. The message is shown only when the specified date lies within a time 
frame when multiple calendars had been in use.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timevalue-calendar-gregorian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-gregorian}}",
+       "valueview-expertextender-calendarhint-julian": "Message informing that 
the JULIAN calendar has been detected automatically while specifying a date. 
The message is shown only when the specified date lies within a time frame when 
multiple calendars had been in use.\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timevalue-calendar-julian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-switch-julian}}",
+       "valueview-expertextender-calendarhint-switch-gregorian": "Label of the 
link manually switching to the GREGORIAN calendar. The link is located directly 
at the preview (in combination with the calendar hint message).\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timevalue-calendar-gregorian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-gregorian}}",
+       "valueview-expertextender-calendarhint-switch-julian": "Label of the 
link manually switching to the JULIAN calendar. The link is located directly at 
the preview (in combination with the calendar hint message).\n\nSee also:\n* 
{{msg-mw|Valueview-expert-timevalue-calendar-julian}}\n* 
{{msg-mw|Valueview-expert-timeinput-calendarhint-julian}}",
        "valueview-expertextender-languageselector-languagetemplate": "Defines 
how the language should be displayed relative to the text.\n\nParameters:\n* $1 
- the text.\n* $2 - the language name or code.",
        "valueview-expertextender-languageselector-label": "Label displayed 
above the language input. The input is either a plain text field or a search 
with a suggester.",
        "valueview-expertextender-unitsuggester-label": "Label displayed above 
the quantity's unit input. The input is a plain text field with an optional 
suggester.",
diff --git a/extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js 
b/extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
index 89819a9..2720637 100644
--- a/extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
+++ b/extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
@@ -14,6 +14,14 @@
         * @constructor
         */
        $.widget( 'ui.commonssuggester', $.ui.suggester, {
+
+               /**
+                * @see jQuery.ui.suggester.options
+                */
+               options: {
+                       ajax: $.ajax
+               },
+
                /**
                 * @inheritdoc
                 * @protected
@@ -32,21 +40,23 @@
                 * @return {Function}
                 */
                _initDefaultSource: function() {
+                       var self = this;
+
                        return function( term ) {
                                var deferred = $.Deferred();
 
-                               $.ajax( {
+                               self.options.ajax( {
                                        url: 
'https://commons.wikimedia.org/w/api.php',
                                        dataType: 'jsonp',
                                        data: {
-                                               search: term,
+                                               search: 
self._grepFileTitleFromTerm( term ),
                                                action: 'opensearch',
                                                namespace: 6
                                        },
                                        timeout: 8000
                                } )
                                .done( function( response ) {
-                                       deferred.resolve( response[1], 
response[0] );
+                                       deferred.resolve( response[1], term );
                                } )
                                .fail( function( jqXHR, textStatus ) {
                                        // Since this is a JSONP request, this 
will always fail with a timeout...
@@ -58,6 +68,25 @@
                },
 
                /**
+                * @private
+                *
+                * @param {string} term
+                * @return {string}
+                */
+               _grepFileTitleFromTerm: function( term ) {
+                       try {
+                               // Make sure there are always at least 2 
characters left
+                               return decodeURIComponent( term
+                                       .replace( 
/^[^#]*\btitle=([^&#]{2,}).*/, '$1' )
+                                       .replace( /^[^#]*\/([^/?#]{2,}).*/, 
'$1' )
+                               );
+                       } catch ( ex ) {
+                               // Revert all replacements when the input was 
not a (fragment of a) valid URL
+                               return term;
+                       }
+               },
+
+               /**
                 * @inheritdoc
                 * @protected
                 */
diff --git a/extensions/ValueView/src/experts/GlobeCoordinateInput.js 
b/extensions/ValueView/src/experts/GlobeCoordinateInput.js
index 30682a6..d93facc 100644
--- a/extensions/ValueView/src/experts/GlobeCoordinateInput.js
+++ b/extensions/ValueView/src/experts/GlobeCoordinateInput.js
@@ -107,16 +107,24 @@
                                if ( !value ) {
                                        return value;
                                }
-                               value = value.getValue().getPrecision();
-                               if ( value === null ) {
-                                       return null;
+
+                               var precision = value.getValue().getPrecision();
+                               if ( !precision ) {
+                                       return {
+                                               custom: true,
+                                               value: null,
+                                               label: 
self._messageProvider.getMessage(
+                                                       
'valueview-expert-globecoordinateinput-nullprecision'
+                                               )
+                                       };
                                }
-                               return getPrecisionSetting( value ) || {
+
+                               return getPrecisionSetting( precision ) || {
                                        custom: true,
-                                       value: value,
+                                       value: precision,
                                        label: self._messageProvider.getMessage(
                                                
'valueview-expert-globecoordinateinput-customprecision',
-                                               [ Formatter.PRECISIONTEXT( 
value ) ]
+                                               [ Formatter.PRECISIONTEXT( 
precision ) ]
                                        )
                                };
                        }
diff --git a/extensions/ValueView/src/experts/resources.php 
b/extensions/ValueView/src/experts/resources.php
index d2c2183..792920d 100644
--- a/extensions/ValueView/src/experts/resources.php
+++ b/extensions/ValueView/src/experts/resources.php
@@ -67,6 +67,7 @@
                        ),
                        'messages' => array(
                                
'valueview-expert-globecoordinateinput-precision',
+                               
'valueview-expert-globecoordinateinput-nullprecision',
                                
'valueview-expert-globecoordinateinput-customprecision',
                        ),
                ),
diff --git a/extensions/ValueView/src/jquery.valueview.valueview.js 
b/extensions/ValueView/src/jquery.valueview.valueview.js
index dd4c66b..2c76592 100644
--- a/extensions/ValueView/src/jquery.valueview.valueview.js
+++ b/extensions/ValueView/src/jquery.valueview.valueview.js
@@ -336,7 +336,7 @@
         * before the edit mode has been started.
         */
        cancelEditing: function() {
-               return this.stopEditing( true );
+               this.stopEditing( true );
        },
 
        /**
diff --git 
a/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js 
b/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js
new file mode 100644
index 0000000..8dd7eba
--- /dev/null
+++ 
b/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js
@@ -0,0 +1,114 @@
+/**
+ * @license GPL-2.0+
+ * @author Thiemo Mättig
+ */
+( function( $, QUnit ) {
+       'use strict';
+
+       /**
+        * @param {Object} [options]
+        * @return {jQuery}
+        */
+       var newTestSuggester = function( options ) {
+               return $( '<input>' )
+                       .addClass( 'test_suggester' )
+                       .appendTo( 'body' )
+                       .commonssuggester( options );
+       };
+
+       QUnit.module( 'jquery.ui.commonssuggester', {
+               teardown: function() {
+                       var $suggester = $( '.test_suggester' ),
+                               suggester = $suggester.data( 'commonssuggester' 
);
+                       if ( suggester ) {
+                               suggester.destroy();
+                       }
+                       $suggester.remove();
+               }
+       } );
+
+       QUnit.test( 'Create', function( assert ) {
+               assert.expect( 1 );
+               var $suggester = newTestSuggester();
+
+               assert.ok(
+                       $suggester.data( 'commonssuggester' ) instanceof 
$.ui.commonssuggester,
+                       'Instantiated commons suggester.'
+               );
+       } );
+
+       QUnit.test( '_grepFileTitleFromTerm', function( assert ) {
+               var $suggester = newTestSuggester(),
+                       suggester = $suggester.data( 'commonssuggester' ),
+                       testCases = {
+                               '': '',
+                               'File:A.jpg': 'File:A.jpg',
+                               '%41': 'A',
+                               'A &%26 B.jpg#not-sure-if-URL': 'A && 
B.jpg#not-sure-if-URL',
+
+                               // Find last title=… parameter
+                               'title=A.jpg&title=B.jpg': 'B.jpg',
+                               'title=A.jpg/title=%42.jpg': 'B.jpg',
+                               'title=File%3AA.jpg&oldid=1#title=/X.jpg': 
'File:A.jpg',
+                               
'https://commons.wikimedia.org/w/?title=File:%41.jpg&action=edit': 'File:A.jpg',
+                               
'https://commons.wikimedia.org/w/index.php?title=File:A.jpg&oldid=1': 
'File:A.jpg',
+                               
'https://commons.wikimedia.org/w/index.php?title=File%3AA.jpg&diff=1': 
'File:A.jpg',
+
+                               // Find last word after a slash
+                               'title=A.jpg/B.jpg': 'B.jpg',
+                               'w/A.jpg': 'A.jpg',
+                               '/w/A.jpg': 'A.jpg',
+                               'A.jpg/B.jpg': 'B.jpg',
+                               'wiki/File:%41.jpg#title=/X.jpg': 'File:A.jpg',
+                               '/wiki/File:A.jpg': 'File:A.jpg',
+                               '//commons.wikimedia.org/wiki/File:A.jpg': 
'File:A.jpg',
+                               
'https://commons.wikimedia.org/wiki/File:A.jpg': 'File:A.jpg',
+                               
'https://commons.wikimedia.org/wiki/File:A.jpg#filehistory': 'File:A.jpg',
+                               
'https://commons.wikimedia.org/wiki/File:A.jpg?action=history': 'File:A.jpg',
+                               
'https://upload.wikimedia.org/wikipedia/commons/6/66/A.jpg': 'A.jpg',
+                               
'/wikipedia/commons/thumb/6/66/A.jpg/100px-A.jpg': '100px-A.jpg',
+
+                               // Minimum is 2 characters
+                               '/w/': '/w/',
+                               'title=A': 'title=A',
+                               'A.jpg/B': 'A.jpg/B',
+                               'A.jpg/B.jpg/C': 'B.jpg',
+
+                               // Do not do anything with invalid URL encoding
+                               '1%': '1%',
+                               'title=1%.jpg': 'title=1%.jpg'
+                       },
+                       numberOfTestCases = Object.keys( testCases ).length;
+
+               assert.expect( numberOfTestCases );
+
+               $.each( testCases, function( input, expected ) {
+                       var actual = suggester._grepFileTitleFromTerm( input );
+
+                       assert.strictEqual( actual, expected );
+               } );
+       } );
+
+       QUnit.test( 'search integration', function( assert ) {
+               assert.expect( 2 );
+               var $suggester = newTestSuggester( { ajax: function( options ) {
+                               var response = [ '', [] ];
+
+                               response[1]._requestTerm = options.data.search;
+
+                               return $.Deferred().resolve( response 
).promise();
+                       } } ),
+                       suggester = $suggester.data( 'commonssuggester' ),
+                       input = 'title=Foo/Bar',
+                       done = assert.async();
+
+               $suggester.val( input );
+               suggester.search().done( function( suggestions, term ) {
+                       assert.strictEqual( suggestions._requestTerm, 'Bar' );
+                       assert.strictEqual( term, input );
+
+                       done();
+               } );
+       } );
+
+}( jQuery, QUnit ) );
diff --git 
a/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js 
b/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
index 7be3e36..51cf201 100644
--- a/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
+++ b/extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
@@ -17,6 +17,7 @@
         * Factory creating a jQuery.ui.suggester widget suitable for testing.
         *
         * @param {Object} [options]
+        * @return {jQuery}
         */
        var newTestSuggester = function( options ) {
                options = $.extend( {
diff --git a/extensions/ValueView/tests/lib/resources.php 
b/extensions/ValueView/tests/lib/resources.php
index 4a07785..306dce0 100644
--- a/extensions/ValueView/tests/lib/resources.php
+++ b/extensions/ValueView/tests/lib/resources.php
@@ -84,6 +84,15 @@
                ),
 
 
+               'jquery.ui.commonssuggester.tests' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'jquery.ui/jquery.ui.commonssuggester.tests.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.commonssuggester',
+                       ),
+               ),
+
                'jquery.ui.inputextender.tests' => $moduleTemplate + array(
                        'scripts' => array(
                                'jquery.ui/jquery.ui.inputextender.tests.js',
diff --git a/extensions/Wikibase/client/i18n/diq.json 
b/extensions/Wikibase/client/i18n/diq.json
index a37a3b6..b5ac21a 100644
--- a/extensions/Wikibase/client/i18n/diq.json
+++ b/extensions/Wikibase/client/i18n/diq.json
@@ -7,7 +7,8 @@
                        "Marmase",
                        "Mirzali",
                        "Kumkumuk",
-                       "Gırd"
+                       "Gırd",
+                       "1917 Ekim Devrimi"
                ]
        },
        "tooltip-t-wikibase": "Dola data de eleqeyın çirs gre",
@@ -46,6 +47,6 @@
        "wikibase-pageswithbadges-submit": "Pelan bımocne",
        "wikibase-pageinfo-entity-id": "{{WBREPONAME}} naskerdışê obcey",
        "wikibase-pageinfo-entity-id-none": "Çıniyo",
-       "wikibase-otherprojects": "Proceyanê binan de",
+       "wikibase-otherprojects": "Zederna Procey",
        "wikibase-otherprojects-beta-message": "Kıştê proceyanê binan"
 }
diff --git a/extensions/Wikibase/client/i18n/pl.json 
b/extensions/Wikibase/client/i18n/pl.json
index cd83bab..694111d 100644
--- a/extensions/Wikibase/client/i18n/pl.json
+++ b/extensions/Wikibase/client/i18n/pl.json
@@ -12,11 +12,30 @@
                        "Peter Bowman",
                        "Tar Lócesilion",
                        "The Polish",
-                       "Rzuwig"
+                       "Rzuwig",
+                       "Woytecr"
                ]
        },
        "wikibase-client-desc": "Klient rozszerzenia Wikibase",
        "tooltip-t-wikibase": "Link do powiązanego elementu w repozytorium 
danych",
+       "apihelp-query+wbentityusage-description": "Zwraca wszystkie 
identyfikatory obiektów użytych na podanych stronach.",
+       "apihelp-query+wbentityusage-param-aspect": "Zwróć tylko identyfikatory 
obiektów wykorzystujące ten aspekt.",
+       "apihelp-query+wbentityusage-param-prop": "Właściwości do dodania do 
wyniku.",
+       "apihelp-query+wbentityusage-paramvalue-prop-url": "Jeżeli włączone, 
zostanie dodany url do elementu",
+       "apihelp-query+wbentityusage-param-entities": "Zwróć tylko stronę, 
która wykorzystuje te elementy.",
+       "apihelp-query+wbentityusage-param-limit": "Ile zwrócić wykorzystanych 
obiektów.",
+       "apihelp-query+wbentityusage-example-simple": "Uzyskaj obiekty 
wykorzystane na stronie <kbd>Main Page</kbd>.",
+       "apihelp-query+wblistentityusage-description": "Zwraca wszystkie 
strony, które wykorzystują obiekty o podanych identyfikatorach.",
+       "apihelp-query+wblistentityusage-param-prop": "Właściwości, które 
dołączyć do wyniku.",
+       "apihelp-query+wblistentityusage-paramvalue-prop-url": "Jeżeli 
włączone, zostanie dołączony url obiektu do wyniku.",
+       "apihelp-query+wblistentityusage-param-aspect": "Zwróć tylko 
identyfikatory obiektów wykorzystujące ten aspekt.",
+       "apihelp-query+wblistentityusage-param-entities": "Obiekty, które 
zostały wykorzystane.",
+       "apihelp-query+wblistentityusage-param-limit": "Ile zwrócić 
wykorzystanych obiektów.",
+       "apihelp-query+wblistentityusage-example-simple": "Uzyskaj strony 
wykorzystujące obiekt <kbd>Q2</kbd>.",
+       "apihelp-query+wblistentityusage-example-url": "Uzyskaj strony 
wykorzystujące obiekt <kbd>Q2</kbd> z dołączonym adresem URL.",
+       "apihelp-query+wblistentityusage-example-aspect": "Uzyskaj strony 
wykorzystujące element <kbd>Q2</kbd>, a aspektem ma być link do strony lub 
stwierdzenie.",
+       "apihelp-query+pageterms-example-label-en": "Uzyskaj etykiety i aliasy 
powiązane ze stroną 'London' po angielsku.",
+       "apihelp-query+pageterms-example-item": "Uzyskaj etykietę i aliasy 
elementu Q84.",
        "wikibase-after-page-move": "Należy także zaktualizować [$1 powiązany 
element Wikidanych] w celu zachowania linków do innych wersji językowych na 
przeniesionej stronie.",
        "wikibase-after-page-move-queued": "Powiązany z tą stroną [$1 element 
Wikidanych] zostanie automatycznie zaktualizowany. Może nie stać się to jednak 
natychmiast.",
        "wikibase-after-page-delete": "Należy również usunąć link do tej strony 
z [$1 odpowiedniego elementu Wikidanych] w celu aktualizacji linków 
językowych.",
@@ -48,7 +67,7 @@
        "wikibase-linkitem-confirmitem-button": "Potwierdź",
        "wikibase-linkitem-not-loggedin-title": "Musisz być zalogowany.",
        "wikibase-linkitem-not-loggedin": "Aby użyć tej funkcji musisz być 
zalogowany na tej wiki oraz [$1 centralnym repozytorium danych].",
-       "wikibase-linkitem-success-link": "Strony zostały pomyślnie powiązane. 
Element zawierający linki możesz znaleźć w naszym [$1 centralnym repozytorium 
danych].",
+       "wikibase-linkitem-success-link": "Strony zostały powiązane. Element 
zawierający linki możesz znaleźć w naszym [$1 centralnym repozytorium danych].",
        "wikibase-property-notfound": "Właściwość $1 nie została znaleziona.",
        "wikibase-rc-hide-wikidata": "$1 {{WBREPONAME}}",
        "wikibase-rc-hide-wikidata-hide": "Ukryj",
@@ -61,23 +80,39 @@
        "wikibase-error-deserialize-error": "Nieudana serializacja danych.",
        "wikibase-error-serialize-error": "Nieudana serializacja danych.",
        "wikibase-error-invalid-entity-id": "Wprowadzony identyfikator jest 
nieznany w systemie. Użyj prawidłowego identyfikatora encji.",
+       "wikibase-error-exceeded-entity-access-limit": "Za dużo wywołań 
elementów z Wikidanych.",
        "unconnectedpages": "Strony niepowiązane z elementami",
+       "unconnectedpages-summary": "Ta strona wymienia strony, które nie są 
powiązane z elementem z danymi (z przestrzeni nazw obsługujących powiązania z 
elementami). Ta lista jest sortowana malejąco według ID strony, więc nowsze 
strony są na początku.",
        "wikibase-unconnectedpages-format-row": "(zawiera $1 
{{PLURAL:$1|odnośnik interwiki|odnośniki interwiki|odnośników interwiki}})",
        "wikibase-unconnectedpages-submit": "Pokaż strony",
        "pageswithbadges": "Strony z odznakami",
+       "pageswithbadges-summary": "Ta strona wymienia strony z odznakami (np. 
dobry artykuł lub artykuł na medal). Ta lista jest sortowana malejąco według ID 
strony, więc nowsze strony są na początku.",
        "wikibase-pageswithbadges-invalid-id": "„$1” nie jest poprawnym 
identyfikatorem elementu",
        "wikibase-pageswithbadges-legend": "Lista stron, którym przyznano 
odznakę",
        "wikibase-pageswithbadges-badge": "Odznaka:",
        "wikibase-pageswithbadges-submit": "Pokaż strony",
+       "entityusage": "Wykorzystanie obiektów",
+       "entityusage-summary": "Ta strona wymienia strony, które odwołują się 
do podanego elementu (np. Q42). Ta strona jest sortowana malejąco według ID 
strony, więc nowsze strony są na początku.",
        "wikibase-entityusage-invalid-id": "$1 nie jest poprawnym 
identyfikatorem elementu",
+       "wikibase-entityusage-legend": "Lista stron korzystających z podanego 
obiektu",
+       "wikibase-entityusage-entity": "Obiekt:",
        "wikibase-entityusage-submit": "Pokaż strony",
        "wikibase-pageinfo-entity-id": "Identyfikator elementu Wikidanych",
        "wikibase-pageinfo-entity-id-none": "brak",
+       "wikibase-pageinfo-entity-usage": "Obiekty z Wikidanych użyte na tej 
stronie",
+       "wikibase-pageinfo-entity-usage-S": "Link do strony",
        "wikibase-pageinfo-entity-usage-L": "Etykieta: $1",
        "wikibase-pageinfo-entity-usage-T": "Tytuł",
+       "wikibase-pageinfo-entity-usage-X": "Wszystkie dane encji",
+       "wikibase-pageinfo-entity-usage-O": "Inne (stwierdzenia)",
        "wikibase-property-render-error": "Nie można zrenderować właściwości 
$1: $2",
        "wikibase-otherprojects": "W innych projektach",
        "wikibase-otherprojects-beta-message": "Pasek siostrzanych projektów",
        "wikibase-otherprojects-beta-description": "Dodaje sekcję 
„{{int:wikibase-otherprojects}}” do paska bocznego, zawierającą odnośniki do 
innych projektów Wikimedia w oparciu o dane z Wikidanych.",
-       "notification-link-text-view-item": "{{GENDER:$1|Zobacz}} element"
+       "echo-category-title-wikibase-action": 
"{{PLURAL:$1|Połączenie|Połączenia}} z Wikidanymi",
+       "echo-pref-tooltip-wikibase-action": "Powiadom mnie, gdy ktoś połączy 
stronę, którą {{GENDER:|utworzyłem|utworzyłam}}, z elementem Wikidanych.",
+       "notification-header-page-connection": "Strona <strong>$3</strong> 
została {{GENDER:$2|powiązana}} z elementem Wikidanych.",
+       "notification-bundle-header-page-connection": "<strong>$3</strong> i 
{{PLURAL:$4|jedna inna strona zostały|$4 inne strony zostały|100=99+ innych 
stron zostało}} {{GENDER:$2|powiązanych}} z elementami Wikidanych.",
+       "notification-link-text-view-item": "{{GENDER:$1|Zobacz}} element",
+       "notification-subject-page-connection": "Strona na {{SITENAME}}, którą 
{{GENDER:$3|utworzyłeś|utworzyłaś}} została {{GENDER:$2|powiązana}} z elementem 
Wikidanych"
 }
diff --git a/extensions/Wikibase/client/i18n/sd.json 
b/extensions/Wikibase/client/i18n/sd.json
index d5d5456..a9acc7f 100644
--- a/extensions/Wikibase/client/i18n/sd.json
+++ b/extensions/Wikibase/client/i18n/sd.json
@@ -13,8 +13,8 @@
        "wikibase-editlinkstitle": "بين‌الزباني ڳنڍڻا سنواريو",
        "wikibase-rc-hide-wikidata": "$1 {{WBREPONAME}}",
        "wikibase-rc-hide-wikidata-hide": "لڪايو",
-       "wikibase-rc-hide-wikidata-show": "نمايو",
-       "wikibase-rc-wikibase-edit-letter": "D",
+       "wikibase-rc-hide-wikidata-show": "ڏيکاريو",
+       "wikibase-rc-wikibase-edit-letter": "ڊ",
        "wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} ترميم",
        "wikibase-unconnectedpages-submit": "صفحا ڏيکاريو",
        "wikibase-otherprojects": "ٻين رٿائن ۾"
diff --git a/extensions/Wikibase/client/i18n/vro.json 
b/extensions/Wikibase/client/i18n/vro.json
index b12557f..9a8af1c 100644
--- a/extensions/Wikibase/client/i18n/vro.json
+++ b/extensions/Wikibase/client/i18n/vro.json
@@ -14,5 +14,5 @@
        "wikibase-rc-hide-wikidata-show": "Näütäq",
        "wikibase-rc-wikibase-edit-letter": "A",
        "wikibase-rc-wikibase-edit-title": "Ütsüse {{WBREPONAME}} muutminõ",
-       "wikibase-otherprojects": "Teisin projekten"
+       "wikibase-otherprojects": "Tõisin projekten"
 }
diff --git a/extensions/Wikibase/client/i18n/zh-hant.json 
b/extensions/Wikibase/client/i18n/zh-hant.json
index fa2f2da..aa424bc 100644
--- a/extensions/Wikibase/client/i18n/zh-hant.json
+++ b/extensions/Wikibase/client/i18n/zh-hant.json
@@ -16,7 +16,8 @@
                        "MoonYaksha",
                        "EagerLin",
                        "一個正常人",
-                       "Cwek"
+                       "Cwek",
+                       "1233thehongkonger"
                ]
        },
        "wikibase-client-desc": "Wikibase 擴充套件客戶端",
@@ -73,6 +74,7 @@
        "wikibase-pageswithbadges-invalid-id": "“$1” 不是一個有效 ID 項目",
        "wikibase-pageswithbadges-badge": "徽章:",
        "wikibase-pageswithbadges-submit": "顯示頁面",
+       "wikibase-entityusage-invalid-id": "“$1” 不是一個有效的實體",
        "wikibase-pageinfo-entity-id": "{{WBREPONAME}} 項目 ID",
        "wikibase-pageinfo-entity-id-none": "無",
        "wikibase-property-render-error": "顯示屬性 $1:$2 失敗",
diff --git 
a/extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php 
b/extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
index 0820dec..7451b5f 100644
--- a/extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
+++ b/extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
@@ -53,7 +53,8 @@
         * @param string $subPage
         */
        public function execute( $subPage ) {
-               $this->prepareParams( $subPage );
+               $entity = $this->getRequest()->getText( 'entity', $subPage );
+               $this->prepareParams( $entity );
 
                if ( $this->entityId !== null ) {
                        parent::execute( $subPage );
@@ -65,11 +66,9 @@
        }
 
        /**
-        * @param string $subPage
+        * @param string $entity
         */
-       private function prepareParams( $subPage ) {
-               $entity = $this->getRequest()->getText( 'entity', $subPage );
-
+       public function prepareParams( $entity ) {
                if ( $entity ) {
                        try {
                                $this->entityId = $this->idParser->parse( 
$entity );
@@ -128,9 +127,11 @@
        public function getQueryInfo() {
                $joinConds = [ 'wbc_entity_usage' => [ 'JOIN', [ 'page_id = 
eu_page_id' ] ] ];
                $conds = [ 'eu_entity_id' => 
$this->entityId->getSerialization() ];
-               $groupConcat = wfGetDB( DB_REPLICA )
-                       ->buildGroupConcatField( '|', 'wbc_entity_usage',
-                               'eu_aspect', $conds, $joinConds
+               $groupConcat = wfGetDB( DB_REPLICA )->buildGroupConcatField(
+                       '|',
+                       'wbc_entity_usage',
+                       'eu_aspect',
+                       [ 'eu_page_id = page_id' ] + $conds
                );
 
                return [
diff --git 
a/extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
 
b/extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
index e3daa05..794289e 100644
--- 
a/extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
+++ 
b/extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
@@ -6,7 +6,9 @@
 use RequestContext;
 use SpecialPageFactory;
 use SpecialPageTestBase;
+use Title;
 use Wikibase\Client\Specials\SpecialEntityUsage;
+use WikiPage;
 
 /**
  * @covers Wikibase\Client\Specials\SpecialEntityUsage
@@ -27,10 +29,18 @@
                                'value' => 11,
                                'namespace' => 0,
                                'title' => 'Tehran',
-                               'aspects' => 'S|O|L.fa',
+                               'aspects' => 'O|L.fa',
                                'eu_page_id' => 11,
                                'eu_entity_id' => 'Q3',
                        ],
+                       (object)[
+                               'value' => 22,
+                               'namespace' => 0,
+                               'title' => 'Athena',
+                               'aspects' => 'S',
+                               'eu_page_id' => 22,
+                               'eu_entity_id' => 'Q3',
+                       ]
                ];
 
                return new FakeResultWrapper( $rows );
@@ -53,18 +63,25 @@
 
        public function testExecuteWithValidParam() {
                list( $result, ) = $this->executeSpecialPage( 'Q3' );
-               $aspects = [
-                       wfMessage( 'wikibase-pageinfo-entity-usage-S' 
)->parse(),
+               $aspectsTehran = [
                        wfMessage( 'wikibase-pageinfo-entity-usage-O' 
)->parse(),
                        wfMessage( 'wikibase-pageinfo-entity-usage-L', 'fa' 
)->parse(),
                ];
-               $aspectList = 
RequestContext::getMain()->getLanguage()->commaList( $aspects );
+               $aspectsAthena = [
+                       wfMessage( 'wikibase-pageinfo-entity-usage-S' 
)->parse(),
+               ];
+
+               $lang = RequestContext::getMain()->getLanguage();
+               $aspectListTehran = $lang->commaList( $aspectsTehran );
+               $aspectListAthena = $lang->commaList( $aspectsAthena );
 
                $this->assertContains( 'Tehran', $result );
+               $this->assertContains( 'Athena', $result );
                $this->assertNotContains( '<p class="error"', $result );
                $expected = SpecialPageFactory::getLocalNameFor( 'EntityUsage', 
'Q3' );
                $this->assertContains( $expected, $result );
-               $this->assertContains( $aspectList, $result );
+               $this->assertContains( ': ' . $aspectListTehran . '</li>', 
$result );
+               $this->assertContains( ': ' . $aspectListAthena . '</li>', 
$result );
        }
 
        public function testExecuteWithInvalidParam() {
@@ -77,4 +94,101 @@
                );
        }
 
+       public function testReallyDoQuery() {
+               if ( wfGetDB( DB_REPLICA )->getType() === 'mysql' &&
+                       $this->usesTemporaryTables()
+               ) {
+                       $this->markTestSkipped( 'MySQL does not allow 
self-joins on temporary tables' );
+               }
+               $this->addReallyDoQueryData();
+
+               $special = new SpecialEntityUsage();
+               $special->prepareParams( 'Q3' );
+               $res = $special->reallyDoQuery( 50 );
+               $values = [];
+               $expectedUsages = [
+                       [ 'L.de' ],
+                       [ 'S', 'O' ],
+               ];
+
+               $i = 0;
+               foreach ( $res as $row ) {
+                       $values[] = [
+                               $row->value,
+                               $row->namespace,
+                               $row->title,
+                               $row->eu_page_id
+                       ];
+
+                       $this->assertUsageAspects( $expectedUsages[$i++], 
$row->aspects );
+               }
+
+               $expected = [
+                       [ '22', '0', 'Berlin', '22' ],
+                       [ '11', '0', 'Vienna', '11' ],
+               ];
+
+               $this->assertSame( $expected, $values );
+       }
+
+       private function assertUsageAspects( $expected, $aspectsString ) {
+               // The aspects are not ordered, so don't take this into account 
when asserting
+               $this->assertArrayEquals( $expected, explode( '|', 
$aspectsString ), false );
+       }
+
+       private function addReallyDoQueryData() {
+               $db = wfGetDB( DB_MASTER );
+               $dump = [
+                       'page' => [
+                               [
+                                       'page_title' => 'Vienna',
+                                       'page_namespace' => 0,
+                                       'page_id' => 11,
+                               ],
+                               [
+                                       'page_title' => 'Berlin',
+                                       'page_namespace' => 0,
+                                       'page_id' => 22,
+                               ],
+                       ],
+                       'wbc_entity_usage' => [
+                               [
+                                       'eu_page_id' => 11,
+                                       'eu_entity_id' => 'Q3',
+                                       'eu_aspect' => 'S'
+                               ],
+                               [
+                                       'eu_page_id' => 11,
+                                       'eu_entity_id' => 'Q3',
+                                       'eu_aspect' => 'O'
+                               ],
+                               [
+                                       'eu_page_id' => 11,
+                                       'eu_entity_id' => 'Q4',
+                                       'eu_aspect' => 'L.en'
+                               ],
+                               [
+                                       'eu_page_id' => 22,
+                                       'eu_entity_id' => 'Q3',
+                                       'eu_aspect' => 'L.de'
+                               ],
+                       ],
+               ];
+
+               foreach ( $dump as $table => $rows ) {
+                       // Clean everything
+                       $db->delete( $table, '*' );
+
+                       foreach ( $rows as $row ) {
+                               if ( $table === 'page' ) {
+                                       $title = Title::newFromText( 
$row['page_title'], $row['page_namespace'] );
+                                       $page = WikiPage::factory( $title );
+                                       $page->insertOn( $db, $row['page_id'] );
+                               } else {
+                                       $db->insert( $table, $row );
+                               }
+                       }
+               }
+       }
+
 }
diff --git a/extensions/Wikibase/composer.json 
b/extensions/Wikibase/composer.json
index 41cea68..d26fea1 100644
--- a/extensions/Wikibase/composer.json
+++ b/extensions/Wikibase/composer.json
@@ -32,7 +32,7 @@
                "data-values/data-types": "~0.5.0",
                "data-values/serialization": "~1.1",
                "data-values/javascript": "~0.8.0",
-               "data-values/value-view": "~0.17.3",
+               "data-values/value-view": "~0.18.0",
                "wikibase/data-model": "~6.1",
                "wikibase/data-model-serialization": "~2.2",
                "wikibase/internal-serialization": "~2.3",
diff --git 
a/extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php 
b/extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
index 0fe4b65..337f5b1 100644
--- a/extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
+++ b/extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
@@ -351,8 +351,8 @@
                        'term_entity_id' => $entityIds,
                );
 
-               if ( $termTypes ) {
-                       $where['term_type'] = $termTypes;
+               if ( $termTypes === null ) {
+                       $termTypes = [ null ];
                }
 
                if ( $languages ) {
@@ -361,14 +361,17 @@
 
                $dbw = $this->getConnection( DB_SLAVE );
 
-               $res = $dbw->select(
-                       $this->termTable,
-                       array( 'term_entity_type', 'term_entity_id', 
'term_type', 'term_language', 'term_text' ),
-                       $where,
-                       __METHOD__
-               );
+               // Do one query per term type here, this is way faster on 
MySQL: T147748
+               foreach ( $termTypes as $termType ) {
+                       $res = $dbw->select(
+                               $this->termTable,
+                               array( 'term_entity_type', 'term_entity_id', 
'term_type', 'term_language', 'term_text' ),
+                               array_merge( $where, $termType !== null ? [ 
'term_type' => $termType ] : [] ),
+                               __METHOD__
+                       );
 
-               $this->injectTerms( $res );
+                       $this->injectTerms( $res );
+               }
 
                $this->releaseConnection( $dbw );
        }
diff --git 
a/extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php 
b/extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
index 8b3730a..c3c59da 100644
--- a/extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
+++ b/extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
@@ -189,14 +189,14 @@
 
        public function collectTermsProvider() {
                return array(
-                       array(
+                       'empty set' => array(
                                array(),
                                null,
                                null,
                                array()
                        ),
 
-                       array(
+                       'all term types' => array(
                                array(
                                        new ItemId( 'Q1' ),
                                        new PropertyId( 'P3' ),
@@ -229,7 +229,7 @@
                                )
                        ),
 
-                       array(
+                       'one term type' => array(
                                array(
                                        new ItemId( 'Q1' ),
                                        new PropertyId( 'P3' ),
@@ -247,6 +247,34 @@
                                        'Q7' => array( 'id' => 'Q7', 'type' => 
Item::ENTITY_TYPE, 'labels' => array() ),
                                )
                        ),
+
+                       'two term types' => array(
+                               array(
+                                       new ItemId( 'Q1' ),
+                                       new PropertyId( 'P3' ),
+                                       new ItemId( 'Q7' ),
+                               ),
+                               array( 'label', 'description' ),
+                               null,
+                               array(
+                                       'Q1' => array( 'id' => 'Q1', 'type' => 
Item::ENTITY_TYPE,
+                                               'labels' => 
$this->makeLanguageValueRecords( array(
+                                                       'en' => 'label:Q1/en', 
'de' => 'label:Q1/de' ) ),
+                                               'descriptions' => 
$this->makeLanguageValueRecords( array(
+                                                       'en' => 
'description:Q1/en', 'de' => 'description:Q1/de' ) )
+                                       ),
+                                       'P3' => array( 'id' => 'P3', 'type' => 
Property::ENTITY_TYPE,
+                                               'labels' => 
$this->makeLanguageValueRecords( array(
+                                                       'en' => 'label:P3/en', 
'de' => 'label:P3/de' ) ),
+                                               'descriptions' => 
$this->makeLanguageValueRecords( array(
+                                                       'en' => 
'description:P3/en', 'de' => 'description:P3/de' ) )
+                                       ),
+                                       'Q7' => array( 'id' => 'Q7', 'type' => 
Item::ENTITY_TYPE,
+                                               'labels' => array(),
+                                               'descriptions' => array()
+                                       ),
+                               )
+                       ),
                );
        }
 
diff --git a/extensions/Wikibase/repo/i18n/cs.json 
b/extensions/Wikibase/repo/i18n/cs.json
index 287793a..178523e 100644
--- a/extensions/Wikibase/repo/i18n/cs.json
+++ b/extensions/Wikibase/repo/i18n/cs.json
@@ -95,8 +95,11 @@
        "wikibase-claimview-snak-tooltip": "Zadejte hodnotu odpovídající 
vlastnosti jménem „$1“. Pokud vlastnost nemá žádnou určenou hodnotu nebo 
skutečná hodnota není známa, můžete kliknutím na ikonu vedle kolonky pro zadání 
hodnoty vybrat jiný typ hodnoty.",
        "wikibase-claimview-snak-new-tooltip": "Po určení vlastnosti můžete 
zadat příslušnou hodnotu. Pokud vlastnost nemá žádnou určenou hodnotu nebo 
skutečná hodnota není známa, můžete kliknutím na ikonu vedle kolonky pro zadání 
hodnoty vybrat jiný typ hodnoty.",
        "wikibase-statementview-rank-preferred": "Preferované postavení",
+       "wikibase-statementview-rank-tooltip-preferred": "Platná a aktuální 
hodnota",
        "wikibase-statementview-rank-normal": "Normální postavení",
+       "wikibase-statementview-rank-tooltip-normal": "Platná hodnota, třebaže 
ne aktuální",
        "wikibase-statementview-rank-deprecated": "Zavržené postavení",
+       "wikibase-statementview-rank-tooltip-deprecated": "Je známo, že hodnota 
není správná, nicméně bývá/byla za ni považována",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|reference|reference|referencí}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Jedna reference zatím nebyla uložena|$1 reference zatím nebyly 
uloženy|$1 referencí zatím nebylo uloženo}}",
        "wikibase-snakview-property-input-placeholder": "vlastnost",
diff --git a/extensions/Wikibase/repo/i18n/de.json 
b/extensions/Wikibase/repo/i18n/de.json
index b20d78c..5b03983 100644
--- a/extensions/Wikibase/repo/i18n/de.json
+++ b/extensions/Wikibase/repo/i18n/de.json
@@ -104,8 +104,11 @@
        "wikibase-claimview-snak-tooltip": "Gib einen Wert ein, der der 
Eigenschaft namens „$1“ entspricht. Falls die Eigenschaft keinen bestimmten 
Wert hat oder der derzeitige Wert unbekannt ist, kannst du einen alternativen 
Werttyp wählen, indem du auf das Symbol vor dem Eingabekasten klickst.",
        "wikibase-claimview-snak-new-tooltip": "Nach der Festlegung einer 
Eigenschaft kannst du einen dazugehörigen Wert eingeben. Falls die Eigenschaft 
keinen bestimmten Wert hat oder der derzeitige Wert unbekannt ist, kannst du 
einen alternativen Werttyp wählen, indem du auf das Symbol vor dem 
Eingabekasten klickst.",
        "wikibase-statementview-rank-preferred": "Bevorzugter Rang",
+       "wikibase-statementview-rank-tooltip-preferred": "Gültiger und 
aktueller Wert",
        "wikibase-statementview-rank-normal": "Normaler Rang",
+       "wikibase-statementview-rank-tooltip-normal": "Gültiger Wert, jedoch 
vermutlich historisch",
        "wikibase-statementview-rank-deprecated": "Missbilligter Rang",
+       "wikibase-statementview-rank-tooltip-deprecated": "Der Wert ist dafür 
bekannt, dass er falsch ist, aber er wird für gewöhnlich allgemein anerkannt.",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|Fundstelle|Fundstellen}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Ein Beleg wurde|$1 Belege wurden}} noch nicht gespeichert",
        "wikibase-snakview-property-input-placeholder": "Eigenschaft",
diff --git a/extensions/Wikibase/repo/i18n/en.json 
b/extensions/Wikibase/repo/i18n/en.json
index ffc0e8f..177580b 100644
--- a/extensions/Wikibase/repo/i18n/en.json
+++ b/extensions/Wikibase/repo/i18n/en.json
@@ -91,8 +91,11 @@
        "wikibase-claimview-snak-tooltip": "Enter a value corresponding to the 
property named \"$1\". If the property has no designated value or the actual 
value is not known, you can choose an alternative value type by clicking the 
icon before the input box.",
        "wikibase-claimview-snak-new-tooltip": "After specifying a property you 
can enter a corresponding value. If the property has no designated value or the 
actual value is not known, you can choose an alternative value type by clicking 
the icon before the input box.",
        "wikibase-statementview-rank-preferred": "Preferred rank",
+       "wikibase-statementview-rank-tooltip-preferred": "Valid and up-to-date 
value",
        "wikibase-statementview-rank-normal": "Normal rank",
+       "wikibase-statementview-rank-tooltip-normal": "Valid value, though 
possibly historic",
        "wikibase-statementview-rank-deprecated": "Deprecated rank",
+       "wikibase-statementview-rank-tooltip-deprecated": "Value is known to be 
wrong but (used to be) commonly believed",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|reference|references}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|One reference|$1 references}} not saved yet",
        "wikibase-snakview-property-input-placeholder": "property",
diff --git a/extensions/Wikibase/repo/i18n/fr.json 
b/extensions/Wikibase/repo/i18n/fr.json
index f78e3b5..fa7eacf 100644
--- a/extensions/Wikibase/repo/i18n/fr.json
+++ b/extensions/Wikibase/repo/i18n/fr.json
@@ -127,8 +127,11 @@
        "wikibase-claimview-snak-tooltip": "Saisissez une valeur correspondant 
à la propriété appelée « $1 ». Si la propriété n’a pas de valeur désignée ou si 
sa valeur actuelle n’est pas connue, vous pouvez choisir une  valeur 
alternative en cliquant sur l’icône précédant la zone de saisie.",
        "wikibase-claimview-snak-new-tooltip": "Après avoir spécifié une 
propriété, vous pouvez saisir une valeur correspondante. Si la propriété n’a 
pas de valeur désignée ou si sa valeur actuelle est inconnue, vous pouvez 
choisir une valeur alternative en cliquant sur l’icône précédant la zone de 
saisie.",
        "wikibase-statementview-rank-preferred": "Rang privilégié",
+       "wikibase-statementview-rank-tooltip-preferred": "Valeur valide et à 
jour",
        "wikibase-statementview-rank-normal": "Rang normal",
+       "wikibase-statementview-rank-tooltip-normal": "Valeur valide, mais 
peut-être historisée",
        "wikibase-statementview-rank-deprecated": "Rang obsolète",
+       "wikibase-statementview-rank-tooltip-deprecated": "La valeur est connue 
pour être fausse, mais (par habitude) est communément admise",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|référence|références}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Une référence|$1 références}} pas encore 
enregistrée{{PLURAL:$1||s}}",
        "wikibase-snakview-property-input-placeholder": "propriété",
diff --git a/extensions/Wikibase/repo/i18n/it.json 
b/extensions/Wikibase/repo/i18n/it.json
index 8d4ad5a..a03be57 100644
--- a/extensions/Wikibase/repo/i18n/it.json
+++ b/extensions/Wikibase/repo/i18n/it.json
@@ -98,8 +98,11 @@
        "wikibase-claimview-snak-tooltip": "Inserisci un valore corrispondente 
alla proprietà chiamata \"$1\". Se la proprietà non ha alcun valore designato o 
non è noto il valore effettivo, è possibile scegliere un tipo di valore 
alternativo facendo clic sull'icona prima della casella di input.",
        "wikibase-claimview-snak-new-tooltip": "Dopo aver specificato una 
proprietà è possibile inserire un valore corrispondente. Se la proprietà non ha 
alcun valore designato o non è noto il valore effettivo, è possibile scegliere 
un tipo di valore alternativo facendo clic sull'icona prima della casella di 
input.",
        "wikibase-statementview-rank-preferred": "Classificato preferito",
+       "wikibase-statementview-rank-tooltip-preferred": "Valore valido e 
aggiornato",
        "wikibase-statementview-rank-normal": "Classificato normale",
+       "wikibase-statementview-rank-tooltip-normal": "Valore valido, ma 
probabilmente storico",
        "wikibase-statementview-rank-deprecated": "Classificato sconsigliato",
+       "wikibase-statementview-rank-tooltip-deprecated": "Il valore è noto per 
essere sbagliato, ma (di solito) è comunemente accettato",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|riferimento|riferimenti}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Un riferimento non ancora salvato|$1 riferimenti non ancora 
salvati}}",
        "wikibase-snakview-property-input-placeholder": "proprietà",
diff --git a/extensions/Wikibase/repo/i18n/lb.json 
b/extensions/Wikibase/repo/i18n/lb.json
index a8de754..60dad28 100644
--- a/extensions/Wikibase/repo/i18n/lb.json
+++ b/extensions/Wikibase/repo/i18n/lb.json
@@ -61,6 +61,7 @@
        "wb-special-newitem-new-item-notification": "Neit Element $1 ugeluecht 
a virugeleet op seng Säit. Zréck op $2.",
        "wikibase-propertypage-datatype": "Datentyp",
        "wikibase-propertypage-bad-datatype": "Onbekannten Datentyp: $1",
+       "wikibase-statementview-rank-tooltip-preferred": "Valabelen an aktuelle 
Wäert",
        "wikibase-statementview-rank-normal": "Normal Bewäertung",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|Referenz|Referenzen}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Eng Referenz|$1 Referenze}} goufen nach net gespäichert",
diff --git a/extensions/Wikibase/repo/i18n/pl.json 
b/extensions/Wikibase/repo/i18n/pl.json
index 9e352ef..7e000a7 100644
--- a/extensions/Wikibase/repo/i18n/pl.json
+++ b/extensions/Wikibase/repo/i18n/pl.json
@@ -94,7 +94,9 @@
        "wikibase-claimview-snak-tooltip": "Podaj wartość odpowiadającą 
właściwości o nazwie „$1”. Jeśli nie istnieje żadna wartość dla tej właściwości 
albo rzeczywista wartość nie jest znana, możesz wybrać alternatywny rodzaj 
wartości, klikając na ikonę przed polem wprowadzania wartości.",
        "wikibase-claimview-snak-new-tooltip": "Po określeniu właściwości można 
podać odpowiadającą jej wartość. Jeśli nie istnieje żadna wartość dla tej 
właściwości albo rzeczywista wartość nie jest znana, możesz wybrać alternatywny 
rodzaj wartości, klikając na ikonę przed polem wprowadzania wartości.",
        "wikibase-statementview-rank-preferred": "Ranga preferowana",
+       "wikibase-statementview-rank-tooltip-preferred": "Wartość prawidłowa i 
aktualna",
        "wikibase-statementview-rank-normal": "Ranga zwykła",
+       "wikibase-statementview-rank-tooltip-normal": "Wartość prawidłowa, choć 
być może historyczna",
        "wikibase-statementview-rank-deprecated": "Ranga nieaktualna",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|odnośnik|odnośniki|odnośników}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"Jeszcze nie zapisano {{PLURAL:$1|jednego odnośnika|$1 odnośników}}",
diff --git a/extensions/Wikibase/repo/i18n/pt.json 
b/extensions/Wikibase/repo/i18n/pt.json
index 860b1cd..654c8c8 100644
--- a/extensions/Wikibase/repo/i18n/pt.json
+++ b/extensions/Wikibase/repo/i18n/pt.json
@@ -89,8 +89,10 @@
        "wikibase-claimview-snak-tooltip": "Insira um valor correspondente à 
propriedade denominada \"$1\". Se a propriedade não tem nenhum valor designado, 
ou o valor real não é conhecido, pode escolher uma alternativa para especificar 
um valor personalizado ao clicar no ícone ao lado da caixa de entrada de 
valor.",
        "wikibase-claimview-snak-new-tooltip": "Depois de especificar uma 
propriedade, pode inserir um valor correspondente. Se a propriedade não tem 
nenhum valor designado, ou o valor real não é conhecido, pode escolher uma 
alternativa para especificar um valor personalizado ao clicar no ícone ao lado 
da caixa de entrada de valor.",
        "wikibase-statementview-rank-preferred": "Classificação prefererida",
+       "wikibase-statementview-rank-tooltip-preferred": "Valor válido e 
atualizado",
        "wikibase-statementview-rank-normal": "Classificação normal",
        "wikibase-statementview-rank-deprecated": "Classificação obsoleta",
+       "wikibase-statementview-rank-tooltip-deprecated": "O valor é conhecido 
por ser errado mas (costumava ser) comummente aceito",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|referência|referências}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"{{PLURAL:$1|Uma referência ainda não gravada|$1 referências ainda não 
gravadas}}",
        "wikibase-snakview-property-input-placeholder": "propriedade",
@@ -207,7 +209,7 @@
        "wikibase-itemmerge-cant-load-entity-content": "Falha ao carregar o 
item.",
        "wikibase-itemmerge-cant-merge-self": "Não é possível fundir um item 
com ele mesmo.",
        "special-dispatchstats": "Estatísticas de envio de alterações",
-       "wikibase-dispatchstats-no-stats": "Não existem estatísticas 
disponíveis actualmente.",
+       "wikibase-dispatchstats-no-stats": "Não existem estatísticas 
disponíveis atualmente.",
        "wikibase-dispatchstats-change-id": "ID",
        "wikibase-dispatchstats-change-timestamp": "Data e hora",
        "wikibase-dispatchstats-oldest-change": "Mais antigo",
@@ -250,7 +252,7 @@
        "wikibase-redirectentity-submit": "Redirecionar",
        "wikibase-api-unresolved-redirect": "O identificador (ID) fornecido 
refere-se a um redirecionamento, o que não é suportado neste contexto.",
        "wikibase-api-no-such-sitelink": "Não foi possível encontrar uma 
ligação de sítio para '$1' ao tentar editar os emblemas.",
-       "wikibase-conflict-patched": "A sua edição foi actualizada para a 
versão mais recente.",
+       "wikibase-conflict-patched": "A sua edição foi adicionada à versão mais 
recente.",
        "wikibase-restoreold": "restaurar",
        "wikibase-entity-summary-restore": "Restaurar revisão $3 por 
[[Special:Contributions/$4|{{GENDER:$4|$4}}]]",
        "wikibase-noentity": "Este conjunto de dados não existe. 
Pode\n[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pesquisar os 
registos relacionados]\npara descobrir o que lhe sucedeu.",
diff --git a/extensions/Wikibase/repo/i18n/qqq.json 
b/extensions/Wikibase/repo/i18n/qqq.json
index 1493122..2e4151b 100644
--- a/extensions/Wikibase/repo/i18n/qqq.json
+++ b/extensions/Wikibase/repo/i18n/qqq.json
@@ -122,8 +122,11 @@
        "wikibase-claimview-snak-tooltip": "Tooltip message displayed when 
hovering/clicking the help icon next to the save, cancel and remove links of a 
claim (see [[d:Wikidata:Glossary#Claim]]).\n\nParameters:\n* $1 - the property 
name the user is about to edit a value of or add another value to",
        "wikibase-claimview-snak-new-tooltip": "Tooltip message displayed when 
hovering/clicking the help icon next to the save, cancel and remove links of a 
claim (see [[d:Wikidata:Glossary]]) when about to add a completely new claim 
which includes specifying the property.",
        "wikibase-statementview-rank-preferred": "Label of the 
[[d:Wikidata:Glossary#Rank-preferred|Preferred Rank]] item within the menu that 
allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]]. The message is additionally used as tooltip 
on the rank icon when the statement has assigned the Preferred rank.",
+       "wikibase-statementview-rank-tooltip-preferred": "Tooltip of the 
[[d:Wikidata:Glossary#Rank-preferred|Preferred Rank]] item within the menu that 
allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]].",
        "wikibase-statementview-rank-normal": "Label of the 
[[d:Wikidata:Glossary#Rank-normal|Normal Rank]] item within the menu that 
allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]]. The message is additionally used as tooltip 
on the rank icon when the statement has assigned the Normal Rank.",
+       "wikibase-statementview-rank-tooltip-normal": "Tooltip of the 
[[d:Wikidata:Glossary#Rank-normal|Normal Rank]] item within the menu that 
allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]].",
        "wikibase-statementview-rank-deprecated": "Label of the 
[[d:Wikidata:Glossary#Rank-deprecated|Deprecated Rank]] item within the menu 
that allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]]. The message is additionally used as tooltip 
on the rank icon when the statement has assigned the Deprecated Rank.",
+       "wikibase-statementview-rank-tooltip-deprecated": "Tooltip of the 
[[d:Wikidata:Glossary#Rank-deprecated|Deprecated Rank]] item within the menu 
that allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]].",
        "wikibase-statementview-references-counter": "Used in the heading for 
the references associated with a statement (see [[d:Wikidata:Glossary]]). The 
heading is giving information about how many references exist for that 
statement. This is the whole heading. The number of unsaved references should 
only be displayed if it's not zero. In that case, it is wrapped by $3 and $4 to 
add an HTML tooltip.\n\nParameters:\n* $1 - the number of saved references\n* 
$2 - the number of unsaved references\n* $3 - placeholder for HTML wrapping the 
number of unsaved references, if displayed (beginning)\n* $4 - placeholder for 
HTML wrapping the number of unsaved references, if displayed 
(end)\n{{Identical|Reference}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"Tooltip displayed in the references heading when there are references (see 
[[d:Wikidata:Glossary]]) in edit mode which are not saved 
yet.\n\nParameters:\n* $1 - the number of elements not saved yet",
        "wikibase-snakview-property-input-placeholder": "Placeholder message 
that is initially displayed within the property input element when adding a new 
snak. See also [[d:Wikidata:Glossary]].\n{{Identical|Property}}",
diff --git a/extensions/Wikibase/repo/i18n/sd.json 
b/extensions/Wikibase/repo/i18n/sd.json
index 7a7c69e..bf6c60d 100644
--- a/extensions/Wikibase/repo/i18n/sd.json
+++ b/extensions/Wikibase/repo/i18n/sd.json
@@ -6,7 +6,7 @@
                        "Mehtab ahmed"
                ]
        },
-       "wikibase-edit": "ترميم",
+       "wikibase-edit": "سنواريو",
        "wikibase-add": "ڏيو",
        "wikibase-entitytermsforlanguagelistview-more": "سڀ داخل ٿيل ٻوليون",
        "wikibase-entitytermsforlanguagelistview-less": "گھٽ ٻوليون",
diff --git a/extensions/Wikibase/repo/i18n/sv.json 
b/extensions/Wikibase/repo/i18n/sv.json
index b647a0a..5043837 100644
--- a/extensions/Wikibase/repo/i18n/sv.json
+++ b/extensions/Wikibase/repo/i18n/sv.json
@@ -91,6 +91,7 @@
        "wikibase-claimview-snak-tooltip": "Ange ett värde som motsvarar 
egenskapen \"$1\". Om egenskapen inte har några angivna värden eller det 
riktiga värdet är okänt kan du välja ett alternativ för att ange ett anpassat 
värdestyp genom att klicka på ikonen innan inmatningsfältet.",
        "wikibase-claimview-snak-new-tooltip": "Efter du har angivit en 
egenskap kan du ange ett motsvarande värde. Om egenskapen inte har några 
angivna värden eller det riktiga värdet är okänt kan du välja ett alternativ 
för att ange ett anpassat värdestyp genom att klicka på ikonen innan 
inmatningsfältet.",
        "wikibase-statementview-rank-preferred": "Föredragen rang",
+       "wikibase-statementview-rank-tooltip-preferred": "Giltigt och 
uppdaterat värde",
        "wikibase-statementview-rank-normal": "Normal rang",
        "wikibase-statementview-rank-deprecated": "Orekommenderad rang",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|referens|referenser}}",
diff --git a/extensions/Wikibase/repo/i18n/zh-hans.json 
b/extensions/Wikibase/repo/i18n/zh-hans.json
index 5539f39..a8e402c 100644
--- a/extensions/Wikibase/repo/i18n/zh-hans.json
+++ b/extensions/Wikibase/repo/i18n/zh-hans.json
@@ -103,8 +103,11 @@
        "wikibase-claimview-snak-tooltip": 
"请输入属性“$1”对应的值。如果该属性没有指定的值或实际值是未知的,您可以通过点击输入框之前的图标来选择一个替代的值类型。",
        "wikibase-claimview-snak-new-tooltip": 
"指定一个属性后您可以输入对应的值。如果该属性没有指定的值或实际值是未知的,您可以通过点击输入框之前的图标来选择一个替代的值类型。",
        "wikibase-statementview-rank-preferred": "首选级",
+       "wikibase-statementview-rank-tooltip-preferred": "有效并保持最新的值",
        "wikibase-statementview-rank-normal": "普通级",
+       "wikibase-statementview-rank-tooltip-normal": "有效值,虽然可能是历史值",
        "wikibase-statementview-rank-deprecated": "弃用级",
+       "wikibase-statementview-rank-tooltip-deprecated": "值被认为错误,但(曾)被普遍认可",
        "wikibase-statementview-references-counter": 
"$1{{PLURAL:$2|0=|$3+$2$4}} {{PLURAL:$1|来源}}",
        "wikibase-statementview-referencesheading-pendingcountertooltip": 
"$1个来源尚未保存",
        "wikibase-snakview-property-input-placeholder": "属性",
diff --git a/extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php 
b/extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
index 8109d3e..8f17de2 100644
--- a/extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
+++ b/extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
@@ -101,21 +101,20 @@
                $latestContent = $latestRevision->getContent();
 
                $diff = $newerContent->getDiff( $olderContent );
+               $patchedContent = $latestContent->getPatchedCopy( $diff );
 
                $summary = $request->getText( 'wpSummary' );
                $editToken = $request->getText( 'wpEditToken' );
 
-               if ( $newerRevision->getId() === $latestRevision->getId() ) { 
// restore
-                       if ( $diff->isEmpty() ) {
+               if ( $request->getCheck( 'restore' ) ) { // restore
+                       if ( $patchedContent->equals( $latestContent ) ) {
                                $status = Status::newGood();
                                $status->warning( 'wikibase-empty-undo' );
                        } else {
                                $summary = $this->makeRestoreSummary( 
$olderRevision, $summary );
-                               $status = $this->attemptSave( $title, 
$olderContent, $summary, $editToken );
+                               $status = $this->attemptSave( $title, 
$patchedContent, $summary, $editToken );
                        }
                } else { // undo
-                       $patchedContent = $latestContent->getPatchedCopy( $diff 
);
-
                        if ( $patchedContent->equals( $latestContent ) ) {
                                $status = Status::newGood();
                                $status->warning( 'wikibase-empty-undo' );
diff --git 
a/extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
 
b/extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
index 79cb7a0..29ab036 100644
--- 
a/extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
+++ 
b/extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
@@ -208,6 +208,7 @@
                                        .append(
                                                $( '<a/>' )
                                                .text( mw.msg( 
'wikibase-statementview-rank-' + rankName ) )
+                                               .attr( 'title', mw.msg( 
'wikibase-statementview-rank-tooltip-' + rankName ) )
                                                .on( 'click.' + 
self.widgetName, function( event ) {
                                                        event.preventDefault();
                                                } )
diff --git a/extensions/Wikibase/view/resources/jquery/wikibase/resources.php 
b/extensions/Wikibase/view/resources/jquery/wikibase/resources.php
index d3c1a46..2c70db8 100644
--- a/extensions/Wikibase/view/resources/jquery/wikibase/resources.php
+++ b/extensions/Wikibase/view/resources/jquery/wikibase/resources.php
@@ -418,8 +418,11 @@
                                'wikibase-claimview-snak-tooltip',
                                'wikibase-claimview-snak-new-tooltip',
                                'wikibase-statementview-rank-preferred',
+                               'wikibase-statementview-rank-tooltip-preferred',
                                'wikibase-statementview-rank-normal',
+                               'wikibase-statementview-rank-tooltip-normal',
                                'wikibase-statementview-rank-deprecated',
+                               
'wikibase-statementview-rank-tooltip-deprecated',
                                'wikibase-statementview-references-counter',
                                
'wikibase-statementview-referencesheading-pendingcountertooltip',
                        ),
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 82ca641..2136a43 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -880,17 +880,17 @@
     },
     {
         "name": "data-values/value-view",
-        "version": "0.17.4",
-        "version_normalized": "0.17.4.0",
+        "version": "0.18.0",
+        "version_normalized": "0.18.0.0",
         "source": {
             "type": "git",
             "url": "https://github.com/wikimedia/data-values-value-view.git";,
-            "reference": "094a35216990d62daf104037edd3d593d406d80d"
+            "reference": "5938027bbbad63e54cfa0266db211bac5fa902b2"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/094a35216990d62daf104037edd3d593d406d80d";,
-            "reference": "094a35216990d62daf104037edd3d593d406d80d",
+            "url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/5938027bbbad63e54cfa0266db211bac5fa902b2";,
+            "reference": "5938027bbbad63e54cfa0266db211bac5fa902b2",
             "shasum": ""
         },
         "require": {
@@ -901,7 +901,7 @@
             "jakub-onderka/php-parallel-lint": "0.9",
             "mediawiki/mediawiki-codesniffer": "0.4.0"
         },
-        "time": "2016-10-05 14:27:34",
+        "time": "2016-10-14 12:19:21",
         "type": "mediawiki-extension",
         "extra": {
             "branch-alias": {
@@ -1348,12 +1348,12 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "7f7a926567984089c1c157da35f19260d18bd7c9"
+            "reference": "a306d01a8be6e9648bef0506cc39772ab48311b2"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7a926567984089c1c157da35f19260d18bd7c9";,
-            "reference": "7f7a926567984089c1c157da35f19260d18bd7c9",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a306d01a8be6e9648bef0506cc39772ab48311b2";,
+            "reference": "a306d01a8be6e9648bef0506cc39772ab48311b2",
             "shasum": ""
         },
         "require": {
@@ -1367,7 +1367,7 @@
             "data-values/serialization": "~1.1",
             "data-values/time": "~0.8.4",
             "data-values/validators": "~0.1.0",
-            "data-values/value-view": "~0.17.3",
+            "data-values/value-view": "~0.18.0",
             "diff/diff": "~2.0",
             "php": ">=5.5.0",
             "wikibase/data-model": "~6.1",
@@ -1386,7 +1386,7 @@
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
         },
-        "time": "2016-10-13 08:27:02",
+        "time": "2016-10-15 21:10:42",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I852ac036cd98ea0687f9f258d1e6b910bae140fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <wikidata-servi...@wikimedia.de>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to