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

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


New Wikidata Build - 2016-05-05T10:00:01+0000

Change-Id: I6ed19c74e8fac8666cbe2937b94b127c2735cae0
---
M composer.lock
M extensions/ArticlePlaceholder/i18n/cs.json
M extensions/ArticlePlaceholder/i18n/fr.json
M extensions/ArticlePlaceholder/i18n/gl.json
M extensions/ArticlePlaceholder/i18n/he.json
M extensions/ArticlePlaceholder/i18n/it.json
M extensions/ArticlePlaceholder/i18n/lt.json
M extensions/ArticlePlaceholder/i18n/zh-hans.json
M extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
M extensions/Wikibase/client/i18n/gor.json
M extensions/Wikibase/client/i18n/min.json
M extensions/Wikibase/lib/i18n/be-tarask.json
A extensions/Wikibase/lib/i18n/gor.json
M extensions/Wikibase/lib/includes/Changes/DiffChange.php
M extensions/Wikibase/lib/includes/Changes/EntityChange.php
M extensions/Wikibase/lib/tests/phpunit/Changes/EntityChangeTest.php
M extensions/Wikibase/lib/tests/phpunit/MockRepository.php
M extensions/Wikibase/repo/i18n/gor.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
M vendor/composer/installed.json
21 files changed, 150 insertions(+), 160 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 7ce1507..25f7b0a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -780,12 +780,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-                "reference": "76dba428cb1f50ab0e34e1f693682039621f4dfd"
+                "reference": "09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/76dba428cb1f50ab0e34e1f693682039621f4dfd";,
-                "reference": "76dba428cb1f50ab0e34e1f693682039621f4dfd",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e";,
+                "reference": "09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e",
                 "shasum": ""
             },
             "require-dev": {
@@ -804,7 +804,7 @@
             ],
             "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
             "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder";,
-            "time": "2016-05-04 12:29:53"
+            "time": "2016-05-04 20:21:22"
         },
         {
             "name": "propertysuggester/property-suggester",
@@ -1561,12 +1561,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "e185e960d35430a0d70586450c39517cffadf46c"
+                "reference": "e03e437e7806818472bb49d3180e264e743ffdd8"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e185e960d35430a0d70586450c39517cffadf46c";,
-                "reference": "e185e960d35430a0d70586450c39517cffadf46c",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e03e437e7806818472bb49d3180e264e743ffdd8";,
+                "reference": "e03e437e7806818472bb49d3180e264e743ffdd8",
                 "shasum": ""
             },
             "require": {
@@ -1638,7 +1638,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2016-05-04 12:46:42"
+            "time": "2016-05-04 21:50:44"
         },
         {
             "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ArticlePlaceholder/i18n/cs.json 
b/extensions/ArticlePlaceholder/i18n/cs.json
index a17bb4a..7d79973 100644
--- a/extensions/ArticlePlaceholder/i18n/cs.json
+++ b/extensions/ArticlePlaceholder/i18n/cs.json
@@ -7,8 +7,8 @@
        },
        "articleplaceholder-desc": "Poskytuje speciální stránku s informacemi z 
{{grammar:2sg|{{WBREPONAME}}}} o nějakém tématu s výzvou k založení článku na 
dané téma",
        "articleplaceholder-abouttopic": "O tématu",
-       "articleplaceholder-abouttopic-intro": "Tato speciální stránka generuje 
stránku s obsahem na nějaké téma s využitím informací z 
{{grammar:2sg|{{WBREPONAME}}}}",
-       "articleplaceholder-abouttopic-entityid": "Zadáním ID položky získáte 
automaticky vygenerovanou kostru článku.",
+       "articleplaceholder-abouttopic-intro": "Tato speciální stránka vám 
poskytne rychlý přehled tématu na základě dat z 
{{grammar:2sg|{{WBREPONAME}}}}.",
+       "articleplaceholder-abouttopic-entityid": "Zadejte ID položky, např. 
Q12345",
        "articleplaceholder-abouttopic-submit": "sestavit",
        "articleplaceholder-abouttopic-no-entity-error": "Toto není platné ID 
položky.",
        "articleplaceholder-abouttopic-create-article": "Vytvořit nový článek s 
názvem",
diff --git a/extensions/ArticlePlaceholder/i18n/fr.json 
b/extensions/ArticlePlaceholder/i18n/fr.json
index d5a8574..82ca956 100644
--- a/extensions/ArticlePlaceholder/i18n/fr.json
+++ b/extensions/ArticlePlaceholder/i18n/fr.json
@@ -8,8 +8,8 @@
        },
        "articleplaceholder-desc": "Fournit une page spéciale avec 
l’information {{WBREPONAME}} sur un certain sujet, avec une invitation à créer 
un article pour le sujet",
        "articleplaceholder-abouttopic": "Sujet \"À propos\"",
-       "articleplaceholder-abouttopic-intro": "Cette page spéciale génère une 
page de contenu sur un certain sujet avec l’information {{WBREPONAME}}",
-       "articleplaceholder-abouttopic-entityid": "Entrer un ID d’élément pour 
obtenir un article fictif généré automatiquement.",
+       "articleplaceholder-abouttopic-intro": "Cette page spéciale vous donne 
un aperçu rapide d’un sujet basé sur les données de {{WBREPONAME}}.",
+       "articleplaceholder-abouttopic-entityid": "Veuillez entrer un ID 
d'élément comme Q12345",
        "articleplaceholder-abouttopic-submit": "réaliser",
        "articleplaceholder-abouttopic-no-entity-error": "Ce n’est pas un ID 
d’élement valide.",
        "articleplaceholder-abouttopic-create-article": "Créer un nouvel 
article avec le titre",
diff --git a/extensions/ArticlePlaceholder/i18n/gl.json 
b/extensions/ArticlePlaceholder/i18n/gl.json
index 7481f00..c42cefd 100644
--- a/extensions/ArticlePlaceholder/i18n/gl.json
+++ b/extensions/ArticlePlaceholder/i18n/gl.json
@@ -6,8 +6,8 @@
        },
        "articleplaceholder-desc": "Proporciona unha páxina especial con 
información de {{WBREPONAME}} sobre tema determinado, con invitación a crear un 
artigo para o tema",
        "articleplaceholder-abouttopic": "Sobre o tema",
-       "articleplaceholder-abouttopic-intro": "Esta páxina especial xenera 
unha páxina de contido sobre un tema determinado con información de 
{{WBREPONAME}}",
-       "articleplaceholder-abouttopic-entityid": "Indique un identificador de 
elemento para obter un marcador de artigo autoxenerado.",
+       "articleplaceholder-abouttopic-intro": "Esta páxina especial 
proporciónalle unha vista rápida dun tema baseado nos datos de {{WBREPONAME}}.",
+       "articleplaceholder-abouttopic-entityid": "Por favor, indique un 
identificador de elemento como por exemplo Q12345",
        "articleplaceholder-abouttopic-submit": "crear",
        "articleplaceholder-abouttopic-no-entity-error": "Este identificador de 
elemento non é válido.",
        "articleplaceholder-abouttopic-create-article": "Crear un artigo novo 
co título",
diff --git a/extensions/ArticlePlaceholder/i18n/he.json 
b/extensions/ArticlePlaceholder/i18n/he.json
index 8aad8d3..7567f8c 100644
--- a/extensions/ArticlePlaceholder/i18n/he.json
+++ b/extensions/ArticlePlaceholder/i18n/he.json
@@ -7,8 +7,8 @@
        },
        "articleplaceholder-desc": "אספקת דף מיוחד עם מידע מתוך {{WBREPONAME}} 
על נושא מסוים, עם הזמנה ליצור ערך על הנושא",
        "articleplaceholder-abouttopic": "על נושא",
-       "articleplaceholder-abouttopic-intro": "הדף המיוחד הזה מחולל דף תוכן על 
נושא מסוים עם מידע מתוך {{WBREPONAME}}",
-       "articleplaceholder-abouttopic-entityid": "נא להזין מזהה פריט כדי לקבל 
ערך ממלא מקום.",
+       "articleplaceholder-abouttopic-intro": "הדף המיוחד הזה נותן לך סקירה 
מהירה של נושא על סמך נתונים מתוך {{WBREPONAME}}.",
+       "articleplaceholder-abouttopic-entityid": "נא להזיז מזהה פריט כגון 
Q12345",
        "articleplaceholder-abouttopic-submit": "לחולל",
        "articleplaceholder-abouttopic-no-entity-error": "זהו אינו מזהה פריט 
תקין.",
        "articleplaceholder-abouttopic-create-article": "יצירת ערך חדש עם 
הכותרת",
diff --git a/extensions/ArticlePlaceholder/i18n/it.json 
b/extensions/ArticlePlaceholder/i18n/it.json
index 628f8d3..47f6a2e 100644
--- a/extensions/ArticlePlaceholder/i18n/it.json
+++ b/extensions/ArticlePlaceholder/i18n/it.json
@@ -6,8 +6,8 @@
        },
        "articleplaceholder-desc": "Fornisce una pagina speciale con 
informazioni da {{WBREPONAME}} su un certo argomento, con l'invito a creare una 
voce su di esso",
        "articleplaceholder-abouttopic": "Sull'argomento",
-       "articleplaceholder-abouttopic-intro": "Questa pagina speciale genera 
una pagina di contenuto su un certo argomento con informazioni da 
{{WBREPONAME}}",
-       "articleplaceholder-abouttopic-entityid": "Inserisci un ID elemento per 
ottenere una voce segnaposto auto-generata.",
+       "articleplaceholder-abouttopic-intro": "Questa pagina speciale ti 
fornisce una rapida panoramica di un argomento basata sui dati provenienti da 
{{WBREPONAME}}.",
+       "articleplaceholder-abouttopic-entityid": "Inserisci un ID elemento 
come Q12345",
        "articleplaceholder-abouttopic-submit": "crea",
        "articleplaceholder-abouttopic-no-entity-error": "Questo non è un ID 
elemento valido.",
        "articleplaceholder-abouttopic-create-article": "Crea una nuova voce 
con il titolo",
diff --git a/extensions/ArticlePlaceholder/i18n/lt.json 
b/extensions/ArticlePlaceholder/i18n/lt.json
index 19ec7f2..3faa346 100644
--- a/extensions/ArticlePlaceholder/i18n/lt.json
+++ b/extensions/ArticlePlaceholder/i18n/lt.json
@@ -4,12 +4,20 @@
                        "Zygimantus"
                ]
        },
+       "articleplaceholder-desc": "Suteikia specialų puslapį su {{WBREPONAME}} 
informacija apie tam tikrą temą, su kvietimu sukurti straipsnį šia tema",
        "articleplaceholder-abouttopic": "Apie temą",
+       "articleplaceholder-abouttopic-intro": "Šis specialus puslapis suteikia 
jums greita apžvalga tema, remiantis duomenimis iš {{WBREPONAME}}.",
+       "articleplaceholder-abouttopic-entityid": "Prašome įvesti elemento ID, 
pvz., Q12345",
+       "articleplaceholder-abouttopic-submit": "ruošti",
+       "articleplaceholder-abouttopic-no-entity-error": "Šis elemento ID 
neteisingas.",
+       "articleplaceholder-abouttopic-create-article": "Kurti naują straipsnį 
su pavadinimu",
        "articleplaceholder-abouttopic-create-article-label": "Straipsnio 
pavadinimas",
        "articleplaceholder-abouttopic-create-article-mandatory": "Straipsnio 
pavadinimas yra privalomas.",
        "articleplaceholder-abouttopic-create-article-button": "Sukurti 
straipsnį",
        "articleplaceholder-abouttopic-create-article-submit-button": 
"Pateikti",
        "articleplaceholder-abouttopic-article-exists-error": "Straipsnis su 
tokiu pavadinimu jau egzistuoja",
+       "articleplaceholder-abouttopic-lua-entity": "Esybė",
+       "articleplaceholder-abouttopic-lua-reference": "Šaltinis",
        "articleplaceholder-abouttopic-lua-identifier": "Išoriniai resursai",
        "articleplaceholder-search-header": "Atrasti duomenis tema"
 }
diff --git a/extensions/ArticlePlaceholder/i18n/zh-hans.json 
b/extensions/ArticlePlaceholder/i18n/zh-hans.json
index 08872f3..4426344 100644
--- a/extensions/ArticlePlaceholder/i18n/zh-hans.json
+++ b/extensions/ArticlePlaceholder/i18n/zh-hans.json
@@ -6,8 +6,8 @@
        },
        "articleplaceholder-desc": 
"提供包含有关特定主题的{{WBREPONAME}}信息的特殊页面,并带有邀请为主题创建条目的功能",
        "articleplaceholder-abouttopic": "关于话题",
-       "articleplaceholder-abouttopic-intro": 
"此特殊页面通过使用{{WBREPONAME}}的信息,生成一段有关某一特定主题内容页面",
-       "articleplaceholder-abouttopic-entityid": "输入一个实体ID以获取自动生成的条目占位符。",
+       "articleplaceholder-abouttopic-intro": 
"此特殊页面基于来自{{WBREPONAME}}的数据,向您提供一段话题的快速预览。",
+       "articleplaceholder-abouttopic-entityid": "请输入一个项ID,例如Q12345",
        "articleplaceholder-abouttopic-submit": "工艺",
        "articleplaceholder-abouttopic-no-entity-error": "这不是有效的实体ID。",
        "articleplaceholder-abouttopic-create-article": "创建一个带标题的新条目",
diff --git 
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js 
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
index 9f3d1a4..b0b1f31 100644
--- 
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
+++ 
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle.js
@@ -116,6 +116,7 @@
 
                button = OO.ui.infuse( 'create-article-button' );
                button.on( 'click', function () {
+                       mw.track( 
'counter.MediaWiki.wikibase.articleplaceholder.button.create-article' );
                        windowManager.openWindow( dialog );
                } );
        }
diff --git a/extensions/Wikibase/client/i18n/gor.json 
b/extensions/Wikibase/client/i18n/gor.json
index 055d0a8..973fef5 100644
--- a/extensions/Wikibase/client/i18n/gor.json
+++ b/extensions/Wikibase/client/i18n/gor.json
@@ -5,9 +5,11 @@
                        "Lukman Tomayahu"
                ]
        },
+       "wikibase-comment-update": "item {{WBREPONAME}} lo'ubawa",
        "wikibase-dataitem": "Item to {{WBREPONAME}}",
        "wikibase-editlinks": "Ubawa pranala",
        "wikibase-editlinkstitle": "Ubawa pranala interwiki",
+       "wikibase-rc-hide-wikidata-show": "Popobilohe",
        "wikibase-rc-wikibase-edit-letter": "D",
        "wikibase-rc-wikibase-edit-title": "Mopo?opiohu {{WBREPONAME}}"
 }
diff --git a/extensions/Wikibase/client/i18n/min.json 
b/extensions/Wikibase/client/i18n/min.json
index 1053ba3..4ed117f 100644
--- a/extensions/Wikibase/client/i18n/min.json
+++ b/extensions/Wikibase/client/i18n/min.json
@@ -36,7 +36,7 @@
        "wikibase-linkitem-not-loggedin": "Sanak musti masuak log pado wiki ko 
dan pado [$1 pusek panyimpanan data] untuak manggunoan fitur iko.",
        "wikibase-linkitem-success-link": "Laman alah barasil ditauikkan. Sanak 
dapek manamukan item barisi tautan tarsabuik pado [$1 pusek panyimpanan data] 
kami.",
        "wikibase-property-notfound": "Properti $1 indak basobok.",
-       "wikibase-rc-hide-wikidata": "$1 Wikidata",
+       "wikibase-rc-hide-wikidata": "$1 {{WBREPONAME}}",
        "wikibase-rc-show-wikidata-pref": "Tunjuakan suntiangan Wikidata di 
parubahan baru",
        "wikibase-watchlist-show-changes-pref": "Tambahan suntiangan Wikidata 
pado daftar pantau",
        "wikibase-error-invalid-entity-id": "ID nan dimasuakan indak dikenal 
sistem. Gunoan entitas ID nan valid.",
diff --git a/extensions/Wikibase/lib/i18n/be-tarask.json 
b/extensions/Wikibase/lib/i18n/be-tarask.json
index e29a1af..27d0329 100644
--- a/extensions/Wikibase/lib/i18n/be-tarask.json
+++ b/extensions/Wikibase/lib/i18n/be-tarask.json
@@ -27,6 +27,7 @@
        "wikibase-language-fallback-transliteration-hint": "$1 
(трансьлітаравана)",
        "wikibase-quantitydetails-amount": "Сума",
        "wikibase-quantitydetails-upperbound": "Верхняя мяжа",
+       "wikibase-quantitydetails-lowerbound": "Ніжняя мяжа",
        "wikibase-sitelinks-wikipedia": "Вікіпэдыя",
        "wikibase-sitelinks-sitename-columnheading": "Мова",
        "wikibase-sitelinks-link-columnheading": "Злучаная старонка",
diff --git a/extensions/Wikibase/lib/i18n/gor.json 
b/extensions/Wikibase/lib/i18n/gor.json
new file mode 100644
index 0000000..c461036
--- /dev/null
+++ b/extensions/Wikibase/lib/i18n/gor.json
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Marwan Mohamad"
+               ]
+       },
+       "wikibase-sitelinks-wikipedia": "Wikipedia"
+}
diff --git a/extensions/Wikibase/lib/includes/Changes/DiffChange.php 
b/extensions/Wikibase/lib/includes/Changes/DiffChange.php
index 2837c22..4e62a5b 100644
--- a/extensions/Wikibase/lib/includes/Changes/DiffChange.php
+++ b/extensions/Wikibase/lib/includes/Changes/DiffChange.php
@@ -3,8 +3,6 @@
 namespace Wikibase;
 
 use Diff\DiffOp\Diff\Diff;
-use Diff\DiffOp\DiffOp;
-use Wikibase\DataModel\Services\Diff\EntityTypeAwareDiffOpFactory;
 
 /**
  * Class for changes that can be represented as a Diff.
@@ -46,80 +44,6 @@
                $info = $this->hasField( 'info' ) ? $this->getField( 'info' ) : 
array();
                $info['diff'] = $diff;
                $this->setField( 'info', $info );
-       }
-
-       /**
-        * @see ChangeRow::serializeInfo()
-        *
-        * Overwritten to use the array representation of the diff.
-        *
-        * @since 0.4
-        * @param array $info
-        * @return string
-        */
-       public function serializeInfo( array $info ) {
-               if ( isset( $info['diff'] ) && $info['diff'] instanceof DiffOp 
) {
-                       /** @var DiffOp $op */
-                       $op = $info['diff'];
-                       $info['diff'] = $op->toArray( array( $this, 
'arrayalizeObjects' ) );
-               }
-
-               return parent::serializeInfo( $info );
-       }
-
-       /**
-        * @see ChangeRow::unserializeInfo()
-        *
-        * Overwritten to use the array representation of the diff.
-        *
-        * @since 0.4
-        * @param string $str
-        * @return array the info array
-        */
-       public function unserializeInfo( $str ) {
-               static $factory = null;
-
-               if ( $factory == null ) {
-                       $factory = new EntityTypeAwareDiffOpFactory( array( 
$this, 'objectifyArrays' ) );
-               }
-
-               $info = parent::unserializeInfo( $str );
-
-               if ( isset( $info['diff'] ) && is_array( $info['diff'] ) ) {
-                       $info['diff'] = $factory->newFromArray( $info['diff'] );
-               }
-
-               return $info;
-       }
-
-       /**
-        * Converts an object to an array structure.
-        * Callback function for use by \Diff\DiffOp::toArray().
-        *
-        * Subclasses should override this to provide array representations of 
specific value objects.
-        *
-        * @since 0.4
-        *
-        * @param mixed $data
-        * @return mixed
-        */
-       public function arrayalizeObjects( $data ) {
-               return $data; // noop
-       }
-
-       /**
-        * May be overwritten by subclasses to provide special handling.
-        * Callback function for use by \Diff\DiffOpFactory
-        *
-        * Subclasses should override this to reconstruct value objects from 
arrays.
-        *
-        * @since 0.4
-        *
-        * @param array $data
-        * @return mixed
-        */
-       public function objectifyArrays( array $data ) {
-               return $data; // noop
        }
 
 }
diff --git a/extensions/Wikibase/lib/includes/Changes/EntityChange.php 
b/extensions/Wikibase/lib/includes/Changes/EntityChange.php
index f62bcdb..85fa678 100644
--- a/extensions/Wikibase/lib/includes/Changes/EntityChange.php
+++ b/extensions/Wikibase/lib/includes/Changes/EntityChange.php
@@ -2,14 +2,19 @@
 
 namespace Wikibase;
 
+use Deserializers\Deserializer;
+use Diff\DiffOp\DiffOp;
+use Diff\DiffOpFactory;
 use MWException;
 use RecentChange;
 use Revision;
 use RuntimeException;
+use Serializers\Serializer;
 use User;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
+use Wikibase\DataModel\Services\Diff\EntityTypeAwareDiffOpFactory;
 use Wikibase\DataModel\Statement\Statement;
 use Wikibase\Repo\WikibaseRepo;
 
@@ -265,28 +270,38 @@
        }
 
        /**
-        * @see DiffChange::arrayalizeObjects
+        * @see ChangeRow::serializeInfo
         *
-        * Overwritten to handle Statement objects.
+        * Overwritten to use the array representation of the diff.
         *
-        * @since 0.4
-        *
-        * @param mixed $data
-        * @return mixed
+        * @param array $info
+        * @return string
         */
-       public function arrayalizeObjects( $data ) {
-               $data = parent::arrayalizeObjects( $data );
+       public function serializeInfo( array $info ) {
+               if ( isset( $info['diff'] ) ) {
+                       $diff = $info['diff'];
 
-               if ( $data instanceof Statement ) {
-                       $array = $this->getStatementSerializer()->serialize( 
$data );
-                       $array['_claimclass_'] = get_class( $data );
+                       if ( $diff instanceof DiffOp ) {
+                               $info['diff'] = $diff->toArray( function ( 
$data ) {
+                                       if ( !( $data instanceof Statement ) ) {
+                                               return $data;
+                                       }
 
-                       return $array;
+                                       $array = 
$this->getStatementSerializer()->serialize( $data );
+                                       $array['_claimclass_'] = get_class( 
$data );
+
+                                       return $array;
+                               } );
+                       }
                }
 
-               return $data;
+               return parent::serializeInfo( $info );
        }
 
+       /**
+        * @throws RuntimeException
+        * @return Serializer
+        */
        private function getStatementSerializer() {
                // FIXME: the change row system needs to be reworked to either 
allow for sane injection
                // or to avoid this kind of configuration dependent tasks.
@@ -299,6 +314,10 @@
                }
        }
 
+       /**
+        * @throws RuntimeException
+        * @return Deserializer
+        */
        private function getStatementDeserializer() {
                // FIXME: the change row system needs to be reworked to either 
allow for sane injection
                // or to avoid this kind of configuration dependent tasks.
@@ -312,31 +331,47 @@
        }
 
        /**
-        * @see DiffChange::objectifyArrays
+        * @see ChangeRow::unserializeInfo
         *
-        * Overwritten to handle Statement objects.
+        * Overwritten to use the array representation of the diff.
         *
-        * @since 0.4
-        *
-        * @param array $data
-        * @return mixed
+        * @param string $serialization
+        * @return array the info array
         */
-       public function objectifyArrays( array $data ) {
-               $data = parent::objectifyArrays( $data );
+       public function unserializeInfo( $serialization ) {
+               static $factory = null;
 
-               if ( is_array( $data ) && isset( $data['_claimclass_'] ) ) {
-                       $class = $data['_claimclass_'];
+               $info = parent::unserializeInfo( $serialization );
 
-                       if ( $class === Statement::class
-                               || is_subclass_of( $class, Statement::class )
-                       ) {
-                               unset( $data['_claimclass_'] );
-
-                               return 
$this->getStatementDeserializer()->deserialize( $data );
+               if ( isset( $info['diff'] ) && is_array( $info['diff'] ) ) {
+                       if ( $factory === null ) {
+                               $factory = $this->newDiffOpFactory();
                        }
+
+                       $info['diff'] = $factory->newFromArray( $info['diff'] );
                }
 
-               return $data;
+               return $info;
+       }
+
+       /**
+        * @return DiffOpFactory
+        */
+       private function newDiffOpFactory() {
+               return new EntityTypeAwareDiffOpFactory( function ( array $data 
) {
+                       if ( is_array( $data ) && isset( $data['_claimclass_'] 
) ) {
+                               $class = $data['_claimclass_'];
+
+                               if ( $class === Statement::class
+                                       || is_subclass_of( $class, 
Statement::class )
+                               ) {
+                                       unset( $data['_claimclass_'] );
+                                       return 
$this->getStatementDeserializer()->deserialize( $data );
+                               }
+                       }
+
+                       return $data;
+               } );
        }
 
 }
diff --git a/extensions/Wikibase/lib/tests/phpunit/Changes/EntityChangeTest.php 
b/extensions/Wikibase/lib/tests/phpunit/Changes/EntityChangeTest.php
index 3c6a5d0..4a1e300 100644
--- a/extensions/Wikibase/lib/tests/phpunit/Changes/EntityChangeTest.php
+++ b/extensions/Wikibase/lib/tests/phpunit/Changes/EntityChangeTest.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Lib\Tests\Changes;
 
-use Diff\DiffOp\Diff\Diff;
 use Diff\DiffOp\DiffOpAdd;
 use RecentChange;
 use Revision;
@@ -302,8 +301,9 @@
                $this->assertEquals( $info, $change->unserializeInfo( 
$change->serializeInfo( $info ) ) );
        }
 
-       public function 
testGivenStatement_arrayalizeObjectsReturnsSerialization() {
+       public function testGivenStatement_serializeInfoSerializesStatement() {
                $statement = new Statement( new PropertyNoValueSnak( 1 ) );
+               $info = array( 'diff' => new DiffOpAdd( $statement ) );
                $expected = array(
                        'mainsnak' => array(
                                'snaktype' => 'novalue',
@@ -321,17 +321,12 @@
                        $this->setExpectedException( RuntimeException::class );
                }
 
-               $array = $change->arrayalizeObjects( $statement );
-               $this->assertSame( $expected, $array );
+               $json = $change->serializeInfo( $info );
+               $array = json_decode( $json, true );
+               $this->assertSame( $expected, $array['diff']['newvalue'] );
        }
 
-       public function 
testGivenNonStatement_arrayalizeObjectsReturnsOriginal() {
-               $data = 'foo';
-               $change = new EntityChange();
-               $this->assertSame( $data, $change->arrayalizeObjects( $data ) );
-       }
-
-       public function 
testGivenStatementSerialization_objectifyArraysReturnsStatement() {
+       public function 
testGivenStatementSerialization_unserializeInfoDeserializesStatement() {
                $data = array(
                        'mainsnak' => array(
                                'snaktype' => 'novalue',
@@ -340,16 +335,12 @@
                        'type' => 'statement',
                        '_claimclass_' => Statement::class,
                );
+               $json = json_encode( array( 'diff' => array( 'type' => 'add', 
'newvalue' => $data ) ) );
 
                $change = new EntityChange();
-               $statement = $change->objectifyArrays( $data );
+               $info = $change->unserializeInfo( $json );
+               $statement = $info['diff']->getNewValue();
                $this->assertInstanceOf( Statement::class, $statement );
-       }
-
-       public function 
testGivenNonStatementSerialization_objectifyArraysReturnsOriginal() {
-               $data = array( 'foo' );
-               $change = new EntityChange();
-               $this->assertSame( $data, $change->objectifyArrays( $data ) );
        }
 
 }
diff --git a/extensions/Wikibase/lib/tests/phpunit/MockRepository.php 
b/extensions/Wikibase/lib/tests/phpunit/MockRepository.php
index cf150f4..eb2b684 100644
--- a/extensions/Wikibase/lib/tests/phpunit/MockRepository.php
+++ b/extensions/Wikibase/lib/tests/phpunit/MockRepository.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lib\Tests;
 
+use InvalidArgumentException;
 use Status;
 use User;
 use Wikibase\DataModel\Entity\EntityDocument;
@@ -257,7 +258,7 @@
                        $revisionId = ++$this->maxRevisionId;
                }
 
-               $this->maxEntityId = max( $this->maxEntityId, 
$entity->getId()->getNumericId() );
+               $this->updateMaxNumericId( $entity->getId() );
                $this->maxRevisionId = max( $this->maxRevisionId, $revisionId );
 
                $revision = new EntityRevision(
@@ -306,7 +307,7 @@
                        $revisionId = ++$this->maxRevisionId;
                }
 
-               $this->maxEntityId = max( $this->maxEntityId, 
$redirect->getTargetId()->getNumericId() );
+               $this->updateMaxNumericId( $redirect->getTargetId() );
                $this->maxRevisionId = max( $this->maxRevisionId, $revisionId );
 
                $this->redirects[$key] = new RedirectRevision(
@@ -614,12 +615,23 @@
                return isset( $this->watchlist[ $user->getName() ][ 
$entityId->getSerialization() ] );
        }
 
+       private function updateMaxNumericId( EntityId $id ) {
+               if ( method_exists( $id, 'getNumericId' ) ) {
+                       $numericId = $id->getNumericId();
+               } else {
+                       // FIXME: This is a generic implementation of 
getNumericId for entities without.
+                       $numericId = (int)preg_replace( '/^\D+/', '', 
$id->getSerialization() );
+               }
+
+               $this->maxEntityId = max( $this->maxEntityId, $numericId );
+       }
+
        /**
         * @see EntityStore::assignFreshId
         *
         * @param EntityDocument $entity
         *
-        * @throws StorageException
+        * @throws InvalidArgumentException when the entity type does not 
support setting numeric ids.
         */
        public function assignFreshId( EntityDocument $entity ) {
                //TODO: Find a canonical way to generate an EntityId from the 
maxId number.
diff --git a/extensions/Wikibase/repo/i18n/gor.json 
b/extensions/Wikibase/repo/i18n/gor.json
index 0763aaf..1fa98ec 100644
--- a/extensions/Wikibase/repo/i18n/gor.json
+++ b/extensions/Wikibase/repo/i18n/gor.json
@@ -4,5 +4,7 @@
                        "Marwan Mohamad"
                ]
        },
-       "wikibase-edit": "ubawa"
+       "wikibase-edit": "ubawa",
+       "wikibase-add": "duhengi",
+       "wikibase-sitelinks-special": "Situs uweewo"
 }
diff --git a/extensions/Wikibase/repo/i18n/zh-hans.json 
b/extensions/Wikibase/repo/i18n/zh-hans.json
index 14bb50a..885f69c 100644
--- a/extensions/Wikibase/repo/i18n/zh-hans.json
+++ b/extensions/Wikibase/repo/i18n/zh-hans.json
@@ -400,6 +400,8 @@
        "apihelp-wbgetclaims-description": "获取Wikibase声称。",
        "apihelp-wbgetclaims-param-entity": "来自要获得声称的实体ID。除非提供声称GUID否则必需。",
        "apihelp-wbgetclaims-param-property": "只返回带主snak声称的可选过滤器,它包含指定属性。",
+       "apihelp-wbgetclaims-param-rank": "可选的过滤器,只返回有指定等级的声称",
+       "apihelp-wbgetclaims-param-props": "声称的某些部分可选返回。此参数控制返回哪些。",
        "apihelp-wbgetclaims-example-1": "获取ID为Q42的项的声称",
        "apihelp-wbgetclaims-example-2": "获得ID为Q42的项和ID为P2的属性的声称",
        "apihelp-wbgetclaims-example-3": "获得ID为Q42的项中,被评级为普通级的声称",
@@ -409,6 +411,7 @@
        "apihelp-wbgetentities-param-sites": 
"用于相应页面存在的网站的标识符\n与“title”一起使用,但只为几个标题提供一个网站,或为一个标题提供几个网站。",
        "apihelp-wbgetentities-param-titles": 
"相应页面的标题\n与“sites”一起使用,但只为多个标题提供一个网站,或只为一个标题提供多个网站。",
        "apihelp-wbgetentities-param-redirects": 
"是否应修复重定向。\n如果设置为“no”,重定向将被视作已删除的实体。",
+       "apihelp-wbgetentities-param-props": "获取每个实体的属性名称。\n将根据提供的语言进一步过滤。",
        "apihelp-wbgetentities-param-languagefallback": 
"允许用于在“languages”参数中定义的语言的语言备选,并带有当前API调用环境。",
        "apihelp-wbgetentities-param-sitefilter": "将实体中的网站链接过滤为这些网站ID内。",
        "apihelp-wbgetentities-example-1": "获取ID为Q42的实体,及所有可用语言中的所有可用属性",
diff --git 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
index 22434e4..88d46aa 100644
--- 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
+++ 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
@@ -307,13 +307,16 @@
                );
                $allLanguages = [];
                if ( $entity instanceof AliasesProvider ) {
-                       $allLanguages += array_keys( 
$entity->getAliasGroups()->toTextArray() );
+                       $aliasLanguages = array_keys( 
$entity->getAliasGroups()->toTextArray() );
+                       $allLanguages = array_merge( $allLanguages, 
$aliasLanguages );
                }
                if ( $entity instanceof DescriptionsProvider ) {
-                       $allLanguages += array_keys( 
$entity->getDescriptions()->toTextArray() );
+                       $descriptionLanguages = array_keys( 
$entity->getDescriptions()->toTextArray() );
+                       $allLanguages = array_merge( $allLanguages, 
$descriptionLanguages );
                }
                if ( $entity instanceof LabelsProvider ) {
-                       $allLanguages += array_keys( 
$entity->getLabels()->toTextArray() );
+                       $labelLanguages = array_keys( 
$entity->getLabels()->toTextArray() );
+                       $allLanguages = array_merge( $allLanguages, 
$labelLanguages );
                }
                $allLanguages = array_unique( $allLanguages );
 
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 5177074..c191071 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -108,19 +108,19 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-            "reference": "76dba428cb1f50ab0e34e1f693682039621f4dfd"
+            "reference": "09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/76dba428cb1f50ab0e34e1f693682039621f4dfd";,
-            "reference": "76dba428cb1f50ab0e34e1f693682039621f4dfd",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e";,
+            "reference": "09ccf83362cf4236dcdfe6d86a067a5fd00a9d3e",
             "shasum": ""
         },
         "require-dev": {
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.5.1"
         },
-        "time": "2016-05-04 12:29:53",
+        "time": "2016-05-04 20:21:22",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "notification-url": "https://packagist.org/downloads/";,
@@ -1340,12 +1340,12 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "e185e960d35430a0d70586450c39517cffadf46c"
+            "reference": "e03e437e7806818472bb49d3180e264e743ffdd8"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e185e960d35430a0d70586450c39517cffadf46c";,
-            "reference": "e185e960d35430a0d70586450c39517cffadf46c",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e03e437e7806818472bb49d3180e264e743ffdd8";,
+            "reference": "e03e437e7806818472bb49d3180e264e743ffdd8",
             "shasum": ""
         },
         "require": {
@@ -1378,7 +1378,7 @@
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
         },
-        "time": "2016-05-04 12:46:42",
+        "time": "2016-05-04 21:50:44",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ed19c74e8fac8666cbe2937b94b127c2735cae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to