WikidataBuilder has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/306407

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

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

Change-Id: Ie0ee24635438096f78e9cb2b1dbacdd5ca2fea97
---
M .gitignore
M README.md
M composer.lock
M extensions/ArticlePlaceholder/i18n/vi.json
M extensions/Wikibase/client/i18n/vi.json
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
M extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
D extensions/Wikibase/client/sql/entity_usage-add-touched.sql
A extensions/Wikibase/client/sql/entity_usage-drop-touched.sql
M extensions/Wikibase/client/sql/entity_usage.sql
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseEntityLibraryTests.lua
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
M extensions/Wikibase/docs/json.wiki
M extensions/Wikibase/docs/lua.wiki
M extensions/Wikibase/docs/usagetracking.wiki
M extensions/Wikibase/lib/i18n/es.json
M extensions/Wikibase/lib/i18n/ru.json
M extensions/Wikibase/lib/i18n/vi.json
M extensions/Wikibase/lib/includes/LanguageFallbackChainFactory.php
M extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
M extensions/Wikibase/repo/i18n/ar.json
M extensions/Wikibase/repo/i18n/mk.json
M extensions/Wikibase/repo/i18n/vi.json
M extensions/Wikibase/repo/i18n/zh-hant.json
M extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
A extensions/Wikidata.org/i18n/jv.json
M vendor/composer/installed.json
32 files changed, 229 insertions(+), 122 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 8f184f2..1b42fbf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea/
 composer.lock
 composer.local.json
 node_modules/
diff --git a/README.md b/README.md
index b1ac126..c6d0154 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,11 @@
 
 Wikidata is using a build with Wikibase and its dependencies packaged into one 
git repo.
 
-If you update the master branch of this repo it will likely be overwritten in 
the next 24 hours. To change things please instead make changes to 
wikidata/build-resources which is used for automated Wikidata builds. (see 
[here](https://phabricator.wikimedia.org/diffusion/WDBR/)).
+If you update the master branch of the Wikidata build repository it will be 
overwritten daily. To change things please instead make changes to [the 
wikidata/build-resources 
repository](https://phabricator.wikimedia.org/diffusion/WDBR/) which is used as 
one of the resources for automated Wikidata builds.
 
 ## Installation
 
-1. Clone the git repo into the [mediawiki extensions 
directory](https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FWikidata)
+1. Clone the git repo into the [mediawiki extensions 
directory](https://phabricator.wikimedia.org/diffusion/EWDA/)
 2. Add the following line to your LocalSettings.php. This entry point in turn 
loads all other entry points.
 
 ##### To enable Repo add the following
@@ -90,4 +90,4 @@
 
 ## Updating this README
 
-This readme is located 
[here](https://phabricator.wikimedia.org/diffusion/WDBR/browse/master/README.md).
 Any changes made to the README in the Wikidata build repo will be overwritten 
by this file daily.
+This README is located in [the wikidata/build-resources 
repository](https://phabricator.wikimedia.org/diffusion/WDBR/browse/master/README.md).
 Any changes made to the README in the Wikidata build repository will be 
overwritten daily.
diff --git a/composer.lock b/composer.lock
index f69565a..858729b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -782,12 +782,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-                "reference": "ae217d202fa5c5bc88fca5ccc4217259fd222635"
+                "reference": "2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/ae217d202fa5c5bc88fca5ccc4217259fd222635";,
-                "reference": "ae217d202fa5c5bc88fca5ccc4217259fd222635",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e";,
+                "reference": "2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e",
                 "shasum": ""
             },
             "require-dev": {
@@ -812,7 +812,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-08-21 01:35:44"
+            "time": "2016-08-24 08:30:24"
         },
         {
             "name": "propertysuggester/property-suggester",
@@ -923,7 +923,7 @@
             "source": {
                 "type": "git",
                 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikidata.org";,
-                "reference": "1b9d7f9e5bc1fefa687f2c71007ca6e6b9d0aa41"
+                "reference": "30e1d291968695b6ce4da45b82e85a331f94f739"
             },
             "require": {
                 "php": ">=5.3.0"
@@ -967,7 +967,7 @@
             "support": {
                 "irc": "irc://irc.freenode.net/wikidata"
             },
-            "time": "2016-08-05 20:35:51"
+            "time": "2016-08-24 08:38:59"
         },
         {
             "name": "wikibase/constraints",
@@ -1568,12 +1568,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "6c0f4c537ec4dd5c16e047b44f358cead5767d09"
+                "reference": "7c19c5037aee83d9eda90da0bdff9a00d21aa521"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/6c0f4c537ec4dd5c16e047b44f358cead5767d09";,
-                "reference": "6c0f4c537ec4dd5c16e047b44f358cead5767d09",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7c19c5037aee83d9eda90da0bdff9a00d21aa521";,
+                "reference": "7c19c5037aee83d9eda90da0bdff9a00d21aa521",
                 "shasum": ""
             },
             "require": {
@@ -1645,7 +1645,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2016-08-22 13:08:13"
+            "time": "2016-08-24 09:29:21"
         },
         {
             "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ArticlePlaceholder/i18n/vi.json 
b/extensions/ArticlePlaceholder/i18n/vi.json
index d87165a..8aeec4f 100644
--- a/extensions/ArticlePlaceholder/i18n/vi.json
+++ b/extensions/ArticlePlaceholder/i18n/vi.json
@@ -4,6 +4,7 @@
                        "Minh Nguyen"
                ]
        },
+       "createtopicpage": "Tạo trang",
        "articleplaceholder-desc": "Cung cấp trang đặc biệt có thông tin 
{{WBREPONAME}} về một đề tài cụ thể và lời khuyên tạo bài về đề tài",
        "articleplaceholder-abouttopic": "Giới thiệu về đề tài",
        "articleplaceholder-abouttopic-intro": "Trang đặc biệt này tóm lược đề 
tài dùng dữ liệu từ {{WBREPONAME}}.",
@@ -19,5 +20,9 @@
        "articleplaceholder-abouttopic-lua-entity": "Thực thể",
        "articleplaceholder-abouttopic-lua-reference": "Chú thích",
        "articleplaceholder-abouttopic-lua-identifier": "Nguồn bên ngoài",
-       "articleplaceholder-search-header": "Tìm hiểu về đề tài"
+       "articleplaceholder-search-header": "Tìm hiểu về đề tài",
+       "articleplaceholder-createpage-title": "Tạo $1",
+       "articleplaceholder-createpage-alreadyexists": "Trang với tên $1 đã tồn 
tại. Xin vui lòng chọn tên khác.",
+       "articleplaceholder-createpage-notitleprovided": "Tên trang không được 
xác định. Xin vui lòng nhập tên trang để tạo.",
+       "articleplaceholder-createpage-invalidtitleprovided": "Bạn đã nhập tên 
trang không hợp lệ. Xin vui lòng nhập một tên hợp lệ."
 }
diff --git a/extensions/Wikibase/client/i18n/vi.json 
b/extensions/Wikibase/client/i18n/vi.json
index 3faabae..6a8eee2 100644
--- a/extensions/Wikibase/client/i18n/vi.json
+++ b/extensions/Wikibase/client/i18n/vi.json
@@ -40,7 +40,6 @@
        "wikibase-linkitem-not-loggedin-title": "Bạn cần đăng nhập",
        "wikibase-linkitem-not-loggedin": "Bạn cần đăng nhập vào cả wiki này 
lẫn [$1 kho dữ liệu chung] để sử dụng tính năng này.",
        "wikibase-linkitem-success-link": "Các trang đã được liên kết với nhau. 
Xem khoản mục chứa các liên kết trong [$1 kho dữ liệu chung].",
-       "wikibase-limitreport-entities-accessed": "Số thục thể Wikibase được 
tải",
        "wikibase-property-notfound": "Không tìm thấy thuộc tính $1.",
        "wikibase-rc-hide-wikidata": "$1 {{WBREPONAME}}",
        "wikibase-rc-hide-wikidata-hide": "Ẩn",
@@ -69,5 +68,11 @@
        "wikibase-property-render-error": "Thất bại khi kết xuất thuộc tính $1: 
$2",
        "wikibase-otherprojects": "Tại dự án khác",
        "wikibase-otherprojects-beta-message": "Hộp thanh bên dự án khác",
-       "wikibase-otherprojects-beta-description": "Thêm hộp thanh bên 
“{{int:wikibase-otherprojects}}” có liên kết đến các dự án Wikimedia khác theo 
dữ liệu {{WBREPONAME}}."
+       "wikibase-otherprojects-beta-description": "Thêm hộp thanh bên 
“{{int:wikibase-otherprojects}}” có liên kết đến các dự án Wikimedia khác theo 
dữ liệu {{WBREPONAME}}.",
+       "echo-category-title-wikibase-action": "{{PLURAL:$1|Liên kết|Các liên 
kết}} từ {{WBREPONAME}}",
+       "echo-pref-tooltip-wikibase-action": "Báo cho tôi biết khi có người 
liên kết một trang tôi tạo ra với khoản mục {{WBREPONAME}}.",
+       "notification-header-page-connection": "Trang <strong>$3</strong> đã 
được {{GENDER:$2}}liên kết với khoản mục {{WBREPONAME}}.",
+       "notification-bundle-header-page-connection": "<strong>$3</strong> và 
{{PLURAL:$4|một trang|$4 trang|100=99+ trang}} khác được  {{GENDER:$2}}liên kết 
với khoản mục {{WBREPONAME}}.",
+       "notification-link-text-view-item": "{{GENDER:$1}}Xem khoản mục",
+       "notification-subject-page-connection": "Một trang {{GENDER:$3}}bạn đã 
tạo ra tại {{SITENAME}} được {{GENDER:$2}}liên kết với khoản mục {{WBREPONAME}}"
 }
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index aadd17c..45c027f 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -408,13 +408,13 @@
         *
         * @param string $prefixedEntityId
         *
-        * @return string[]
+        * @return string[]|null[]
         */
        public function getLabel( $prefixedEntityId ) {
                $this->checkType( 'getLabel', 1, $prefixedEntityId, 'string' );
                $this->splitParserCacheIfMultilingual();
 
-               return array( $this->getLuaBindings()->getLabel( 
$prefixedEntityId ) );
+               return $this->getLuaBindings()->getLabel( $prefixedEntityId );
        }
 
        /**
@@ -424,13 +424,13 @@
         *
         * @param string $prefixedEntityId
         *
-        * @return string[]
+        * @return string[]|null[]
         */
        public function getDescription( $prefixedEntityId ) {
                $this->checkType( 'getDescription', 1, $prefixedEntityId, 
'string' );
                $this->splitParserCacheIfMultilingual();
 
-               return array( $this->getLuaBindings()->getDescription( 
$prefixedEntityId ) );
+               return $this->getLuaBindings()->getDescription( 
$prefixedEntityId );
        }
 
        /**
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
index 62e2005..495476e 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
+++ 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
@@ -125,62 +125,64 @@
         * @param string $prefixedEntityId
         *
         * @since 0.5
-        * @return string|null Null if entity couldn't be found/ no label 
present
+        * @return string[]|null[] Array containing label, label language code.
+        *     Null for both, if entity couldn't be found/ no label present.
         */
        public function getLabel( $prefixedEntityId ) {
                try {
                        $entityId = $this->entityIdParser->parse( 
$prefixedEntityId );
                } catch ( EntityIdParsingException $e ) {
-                       return null;
+                       return [ null, null ];
                }
 
                try {
                        $term = $this->labelDescriptionLookup->getLabel( 
$entityId );
                } catch ( StorageException $ex ) {
                        // TODO: verify this catch is still needed
-                       return null;
+                       return [ null, null ];
                } catch ( LabelDescriptionLookupException $ex ) {
-                       return null;
+                       return [ null, null ];
                }
 
                if ( $term === null ) {
-                       return null;
+                       return [ null, null ];
                }
 
                // NOTE: This tracks a label usage in the wiki's content 
language.
-               return $term->getText();
+               return [ $term->getText(), $term->getLanguageCode() ];
        }
 
        /**
         * @param string $prefixedEntityId
         *
         * @since 0.5
-        * @return string|null Null if entity couldn't be found/ no description 
present
+        * @return string[]|null[] Array containing description, description 
language code.
+        *     Null for both, if entity couldn't be found/ no description 
present.
         */
        public function getDescription( $prefixedEntityId ) {
                try {
                        $entityId = $this->entityIdParser->parse( 
$prefixedEntityId );
                } catch ( EntityIdParsingException $e ) {
-                       return null;
+                       return [ null, null ];
                }
 
                try {
                        $term = $this->labelDescriptionLookup->getDescription( 
$entityId );
                } catch ( StorageException $ex ) {
                        // TODO: verify this catch is still needed
-                       return null;
+                       return [ null, null ];
                } catch ( LabelDescriptionLookupException $ex ) {
-                       return null;
+                       return [ null, null ];
                }
 
                if ( $term === null ) {
-                       return null;
+                       return [ null, null ];
                }
 
                // XXX: This. Sucks. A lot.
                // Also notes about language fallbacks from getLabel apply
                $this->usageAccumulator->addOtherUsage( $entityId );
-               return $term->getText();
+               return [ $term->getText(), $term->getLanguageCode() ];
        }
 
        /**
@@ -198,8 +200,8 @@
 
                // @fixme the SiteLinks do not contain badges! but all we want 
here is page name.
                $siteLinkRows = $this->siteLinkLookup->getLinks(
-                       array( $itemId->getNumericId() ),
-                       array( $this->siteId )
+                       [ $itemId->getNumericId() ],
+                       [ $this->siteId ]
                );
 
                foreach ( $siteLinkRows as $siteLinkRow ) {
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
index 567f197..9aff983 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
+++ 
b/extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
@@ -53,20 +53,21 @@
        langCode = langCode or mw.language.getContentLanguage():getCode()
 
        if langCode == nil then
-               return nil
+               return nil, nil
        end
 
        if entity.labels == nil then
-               return nil
+               return nil, nil
        end
 
        local label = entity.labels[langCode]
 
        if label == nil then
-               return nil
+               return nil, nil
        end
 
-       return label.value
+       local actualLang = label.language or langCode
+       return label.value, actualLang
 end
 
 -- Get the sitelink title linking to the given site id
diff --git 
a/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
 
b/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
index 02ab3e1..26cf796 100644
--- 
a/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
+++ 
b/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
@@ -65,11 +65,11 @@
                                $this->dbUpdater->modifyExtensionField( $table, 
'eu_aspect', $script );
                        }
 
-                       $script = $this->getUpdateScriptPath( 
'entity_usage-add-touched', $db->getType() );
-                       $this->dbUpdater->addExtensionField( $table, 
'eu_touched', $script );
-
                        $script = $this->getUpdateScriptPath( 
'entity_usage-drop-entity_type', $db->getType() );
                        $this->dbUpdater->dropExtensionField( $table, 
'eu_entity_type', $script );
+
+                       $script = $this->getUpdateScriptPath( 
'entity_usage-drop-touched', $db->getType() );
+                       $this->dbUpdater->dropExtensionField( $table, 
'eu_touched', $script );
                }
        }
 
diff --git a/extensions/Wikibase/client/sql/entity_usage-add-touched.sql 
b/extensions/Wikibase/client/sql/entity_usage-add-touched.sql
deleted file mode 100644
index bb6106f..0000000
--- a/extensions/Wikibase/client/sql/entity_usage-add-touched.sql
+++ /dev/null
@@ -1,3 +0,0 @@
--- Add a column for tracking page.page_touched, to detect outdated entries in 
wbc_entity_usage.
-ALTER TABLE /*_*/wbc_entity_usage
-  ADD COLUMN eu_touched BINARY(14) NOT NULL DEFAULT '';
diff --git a/extensions/Wikibase/client/sql/entity_usage-drop-touched.sql 
b/extensions/Wikibase/client/sql/entity_usage-drop-touched.sql
new file mode 100644
index 0000000..58b485d
--- /dev/null
+++ b/extensions/Wikibase/client/sql/entity_usage-drop-touched.sql
@@ -0,0 +1,4 @@
+-- get rid of the eu_touched column
+
+ALTER TABLE /*_*/wbc_entity_usage
+  DROP COLUMN eu_touched;
diff --git a/extensions/Wikibase/client/sql/entity_usage.sql 
b/extensions/Wikibase/client/sql/entity_usage.sql
index 4d93943..62140f5 100644
--- a/extensions/Wikibase/client/sql/entity_usage.sql
+++ b/extensions/Wikibase/client/sql/entity_usage.sql
@@ -2,8 +2,7 @@
   eu_row_id         BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
   eu_entity_id      VARBINARY(255) NOT NULL, -- the ID of the entity being used
   eu_aspect         VARBINARY(37) NOT NULL,  -- the aspect of the entity. See 
EntityUsage::XXX_USAGE for possible values.
-  eu_page_id        INT NOT NULL,            -- the ID of the page that uses 
the entities.
-  eu_touched        BINARY(14) NOT NULL DEFAULT '' -- timestamp corresponding 
to page.page_touched
+  eu_page_id        INT NOT NULL             -- the ID of the page that uses 
the entities.
 ) /*$wgDBTableOptions*/;
 
 -- record one usage per page per aspect of an entity
diff --git 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseEntityLibraryTests.lua
 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseEntityLibraryTests.lua
index d587c5b..2dcc815 100644
--- 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseEntityLibraryTests.lua
+++ 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseEntityLibraryTests.lua
@@ -21,7 +21,8 @@
                        value = 'LabelDE'
                },
                en = {
-                       value = 'LabelEN'
+                       value = 'LabelDE-fallback',
+                       language = 'de'
                }
        },
        sitelinks = {
@@ -151,7 +152,7 @@
        },
        { name = 'mw.wikibase.entity.getLabel 1', func = testGetLabel, 
type='ToString',
          args = { 'de' },
-         expect = { 'LabelDE' }
+         expect = { 'LabelDE', 'de' }
        },
        { name = 'mw.wikibase.entity.getLabel 2', func = testGetLabel, 
type='ToString',
          args = { 'oooOOOOooo' },
@@ -162,7 +163,11 @@
          expect = "bad argument #1 to 'getLabel' (string, number or nil 
expected, got function)"
        },
        { name = 'mw.wikibase.entity.getLabel 4 (content language)', func = 
testGetLabel, type='ToString',
-         expect = { 'LabelDE' }
+         expect = { 'LabelDE', 'de' }
+       },
+       { name = 'mw.wikibase.entity.getLabel 5 (actual lang code)', func = 
testGetLabel, type='ToString',
+         args = { 'en' },
+         expect = { 'LabelDE-fallback', 'de' }
        },
        { name = 'mw.wikibase.entity.getSitelink 1', func = testGetSitelink, 
type='ToString',
          args = { 'ruwiki' },
@@ -202,11 +207,11 @@
        -- Integration tests
 
        { name = 'mw.wikibase.entity.getLabel integration 1', func = 
integrationTestGetLabel, type='ToString',
-         expect = { 'Lua Test Item' }
+         expect = { 'Lua Test Item', 'de' }
        },
        { name = 'mw.wikibase.entity.getLabel integration 2', func = 
integrationTestGetLabel, type='ToString',
          args = { 'en' },
-         expect = { 'Test all the code paths' }
+         expect = { 'Test all the code paths', 'en' }
        },
        { name = 'mw.wikibase.entity.getSitelink integration 1', func = 
integrationTestGetSitelink, type='ToString',
          expect = { 'WikibaseClientDataAccessTest' }
diff --git 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua
 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua
index ba5ebfa..2e85fea 100644
--- 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua
+++ 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua
@@ -77,7 +77,7 @@
          expect = { nil }
        },
        { name = "mw.wikibase.getEntityObject (foreign access)", func = 
testGetEntityObjectForeignLabel,
-         expect = { 'Arbitrary access \\o/' }
+         expect = { 'Arbitrary access \\o/', 'de' }
        },
        { name = 'mw.wikibase.getEntityObject (id must be string)', func = 
mw.wikibase.getEntityObject,
          args = { 123 },
@@ -85,7 +85,7 @@
        },
        { name = 'mw.wikibase.label', func = mw.wikibase.label, type='ToString',
          args = { 'Q32487' },
-         expect = { 'Lua Test Item' }
+         expect = { 'Lua Test Item', 'de' }
        },
        { name = 'mw.wikibase.label (no such item)', func = mw.wikibase.label, 
type='ToString',
          args = { 'Q1224342342' },
@@ -93,7 +93,7 @@
        },
        { name = 'mw.wikibase.label (connected item)', func = 
mw.wikibase.label, type='ToString',
          args = {},
-         expect = { 'Lua Test Item' }
+         expect = { 'Lua Test Item', 'de' }
        },
        { name = 'mw.wikibase.label (no label)', func = mw.wikibase.label, 
type='ToString',
          args = { 'Q32488' },
@@ -101,11 +101,11 @@
        },
        { name = 'mw.wikibase.description', func = mw.wikibase.description, 
type='ToString',
          args = { 'Q32487' },
-         expect = { 'Description of Q32487' }
+         expect = { 'Description of Q32487', 'de' }
        },
        { name = 'mw.wikibase.description (connected item)', func = 
mw.wikibase.description, type='ToString',
          args = {},
-         expect = { 'Description of Q32487' }
+         expect = { 'Description of Q32487', 'de' }
        },
        { name = 'mw.wikibase.description (no such item)', func = 
mw.wikibase.description, type='ToString',
          args = { 'Q1224342342' },
diff --git 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
index c87c190..9324d5b 100644
--- 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
+++ 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
@@ -145,7 +145,7 @@
                $this->assertEquals( $expected, $entityArray, 'getEntity' );
 
                $label = $luaWikibaseLibrary->getLabel( 'Q885588' );
-               $this->assertEquals( array( 'پسیک' ), $label, 'getLabel' );
+               $this->assertEquals( array( 'پسیک', 'ku-arab' ), $label, 
'getLabel' );
 
                // All languages in the fallback chain for 'ku-arab' count as 
"used".
                $usage = 
$luaWikibaseLibrary->getUsageAccumulator()->getUsages();
@@ -232,9 +232,15 @@
                $label = $luaWikibaseLibrary->getLabel( 'Q32487' );
 
                if ( $allowDataAccessInUserLanguage ) {
-                       $this->assertSame( 'Lua Test Item', $label[0] );
+                       $this->assertSame(
+                               array( 'Lua Test Item', 'de' ),
+                               $label
+                       );
                } else {
-                       $this->assertSame( 'Test all the code paths', $label[0] 
);
+                       $this->assertSame(
+                               array( 'Test all the code paths', 'en' ),
+                               $label
+                       );
                }
 
                $this->assertSame( $allowDataAccessInUserLanguage, $cacheSplit 
);
diff --git 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
index ab9ebda..a24b636 100644
--- 
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
+++ 
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
@@ -55,11 +55,11 @@
                $labelDescriptionLookup = $this->getMock( 
LabelDescriptionLookup::class );
                $labelDescriptionLookup->expects( $this->any() )
                        ->method( 'getLabel' )
-                       ->will( $this->returnValue( new Term( 'xy', 
'LabelString' ) ) );
+                       ->will( $this->returnValue( new Term( 'lang-code', 
'LabelString' ) ) );
 
                $labelDescriptionLookup->expects( $this->any() )
                        ->method( 'getDescription' )
-                       ->will( $this->returnValue( new Term( 'xy', 
'DescriptionString' ) ) );
+                       ->will( $this->returnValue( new Term( 'lang-code', 
'DescriptionString' ) ) );
 
                return new WikibaseLuaBindings(
                        new BasicEntityIdParser(),
@@ -115,8 +115,8 @@
 
        public function getLabelProvider() {
                return array(
-                       array( 'LabelString', 'Q123' ),
-                       array( null, 'DoesntExist' )
+                       array( array( 'LabelString', 'lang-code' ), 'Q123' ),
+                       array( array( null, null ), 'DoesntExist' )
                );
        }
 
@@ -154,8 +154,8 @@
 
        public function getDescriptionProvider() {
                return array(
-                       array( 'DescriptionString', 'Q123' ),
-                       array( null, 'DoesntExist' )
+                       array( array( 'DescriptionString', 'lang-code' ), 
'Q123' ),
+                       array( array( null, null ), 'DoesntExist' )
                );
        }
 
diff --git a/extensions/Wikibase/docs/json.wiki 
b/extensions/Wikibase/docs/json.wiki
index 2c581cf..0656edd 100644
--- a/extensions/Wikibase/docs/json.wiki
+++ b/extensions/Wikibase/docs/json.wiki
@@ -16,7 +16,7 @@
 ** using either Unicode escape sequences (like \u0645) resulting in a UTF16 
representation when decoded.
 ** ...or using native UTF8 encoding.
 * Numbers may be given in two ways:
-** integers from -31^2+1 to +31^2-1 may be represented as number literals.
+** integers from -(2^31) to 2^31-1 may be represented as number literals.
 ** all numbers may be represented as decimal strings. In particular, quantity 
values are represented as arbitrary precision decimal strings.
 * Entity IDs are given as upper-case strings, e.g. "P29" or "Q623289".
 * In JSON dumps, each entity is encoded in as a single line. This allows 
consumers to process the dump line by line, decoding each entity separately.
diff --git a/extensions/Wikibase/docs/lua.wiki 
b/extensions/Wikibase/docs/lua.wiki
index c06febb..f4a3a54 100644
--- a/extensions/Wikibase/docs/lua.wiki
+++ b/extensions/Wikibase/docs/lua.wiki
@@ -44,11 +44,12 @@
 <code>wikibase.label( id )</code><br>
 Takes an item ID and returns the label in the language of the local Wiki.
 
-If no ID was specified, then the label of the item connected to the current 
page will be returned, if the page is indeed connected and a label exists in 
the wiki's language or in a fallback language.
+If no ID was specified, then the label of the item connected to the current 
page will be returned, if the page is indeed connected and a label exists in 
the wiki's language or in a fallback language. Second return parameter is the 
language the returned label is in.
 
 An example call might look like this:
 <source lang="lua">
 mw.wikibase.label( 'Q42' ) -- Returns the label of the item as a string, like 
"Berlin".
+local label, lang = mw.wikibase.label( 'Q42' ) -- label contains the text of 
the label. lang is the language the returned label is in, like "de".
 </source>
 
 === mw.wikibase.sitelink ===
@@ -65,11 +66,12 @@
 <code>wikibase.description( id )</code><br>
 Takes an item ID and returns the description in the language of the local Wiki.
 
-If no ID was specified, then the description of the item connected to the 
current page will be returned, if the page is indeed connected and a 
description exists in the wiki's language or in a fallback language.
+If no ID was specified, then the description of the item connected to the 
current page will be returned, if the page is indeed connected and a 
description exists in the wiki's language or in a fallback language. Second 
return parameter is the language the returned description is in.
 
 An example call might look like this:
 <source lang="lua">
 mw.wikibase.description( 'Q42' ) -- Returns the description of the item as a 
string, like "capital of Germany".
+local description, lang = mw.wikibase.description( 'Q42' ) -- description 
contains the text of the description. lang is the language the returned 
description is in, like "de".
 </source>
 
 === mw.wikibase.renderSnak ===
@@ -132,11 +134,12 @@
 === mw.wikibase.entity:getLabel ===
 <code>entity:getLabel()</code><br>
 <code>entity:getLabel( langCode )</code><br>
-Returns the label of the entity in the language given as <code>langCode</code> 
or in the Wiki's content language.
+Returns the label of the entity in the language given as <code>langCode</code> 
or in the Wiki's content language. Second return parameter is the language the 
returned label is in.
 
 An example call might look like this:
 <source lang="lua">
 entity:getLabel( 'de' ) -- Returns a string, like "Berlin"
+local label, lang = entity:getLabel( 'de' ) -- label contains the text of the 
label. lang is the language the returned label is in, like "de".
 </source>
 
 === mw.wikibase.entity:getSitelink ===
diff --git a/extensions/Wikibase/docs/usagetracking.wiki 
b/extensions/Wikibase/docs/usagetracking.wiki
index c3d9e0e..d32b0d6 100644
--- a/extensions/Wikibase/docs/usagetracking.wiki
+++ b/extensions/Wikibase/docs/usagetracking.wiki
@@ -38,7 +38,6 @@
   eu_entity_id      VARBINARY(255) NOT NULL  -- the ID of the entity being used
   eu_aspect         VARBINARY(37) NOT NULL   -- the aspect of the entity. See 
EntityUsage::XXX_USAGE for possible values.
   eu_page_id        INT NOT NULL             -- the ID of the page that uses 
the entities.
-  eu_touched        BINARY(14) NOT NULL DEFAULT '' -- timestamp corresponding 
to page.page_touched (currently unused)
 
 The following indexes are provided for efficient access:
 
diff --git a/extensions/Wikibase/lib/i18n/es.json 
b/extensions/Wikibase/lib/i18n/es.json
index 43d8e93..2082a61 100644
--- a/extensions/Wikibase/lib/i18n/es.json
+++ b/extensions/Wikibase/lib/i18n/es.json
@@ -13,7 +13,8 @@
                        "JasterTDC",
                        "Gustronico",
                        "Littledogboy",
-                       "YoViajo"
+                       "YoViajo",
+                       "Dgstranz"
                ]
        },
        "wikibase-lib-desc": "Contiene una funcionalidad común para las 
extensiones Wikibase y cliente de Wikibase.",
@@ -75,7 +76,8 @@
        "wikibase-validator-bad-value": "Valor corrupto: $1",
        "wikibase-validator-bad-value-type": "Tipo de valor incorrecto $1, se 
esperaba $2",
        "wikibase-validator-bad-data-type": "Tipo de dato erróneo: $1",
-       "wikibase-validator-bad-url": "URL incorrecta: $1",
+       "wikibase-validator-bad-url": "Las URL no pueden contener determinados 
caracteres tales como espacios y corchetes.",
+       "wikibase-validator-url-scheme-missing": "A esta URL le falta un 
esquema como \"http://\"; o \"https://\".";,
        "wikibase-validator-bad-url-scheme": "Esquema de URL no admitido: $1",
        "wikibase-validator-unknown-unit": "Unidad desconocida: $1",
        "wikibase-validator-not-allowed": "Valor ilegal: $1",
diff --git a/extensions/Wikibase/lib/i18n/ru.json 
b/extensions/Wikibase/lib/i18n/ru.json
index a300b88..10a07f5 100644
--- a/extensions/Wikibase/lib/i18n/ru.json
+++ b/extensions/Wikibase/lib/i18n/ru.json
@@ -71,7 +71,7 @@
        "wikibase-validator-bad-value": "Значение данных повреждено: $1",
        "wikibase-validator-bad-value-type": "Недопустимое значение типа «$1», 
ожидаемый тип — «$2»",
        "wikibase-validator-bad-data-type": "Неправильный тип данных: $1",
-       "wikibase-validator-bad-url": "Искажённый URL: $1",
+       "wikibase-validator-bad-url": "URL-адреса не должны содержать 
определенные символы, такие как пробелы и квадратные скобки.",
        "wikibase-validator-bad-url-scheme": "URL-схема «$1» не 
поддерживается.",
        "wikibase-validator-unknown-unit": "Неизвестная единица измерения: $1",
        "wikibase-validator-not-allowed": "Недопустимое значение: $1",
diff --git a/extensions/Wikibase/lib/i18n/vi.json 
b/extensions/Wikibase/lib/i18n/vi.json
index b82aaa1..436279f 100644
--- a/extensions/Wikibase/lib/i18n/vi.json
+++ b/extensions/Wikibase/lib/i18n/vi.json
@@ -13,10 +13,10 @@
        "wikibase-deletedentity-property": "Thuộc tính đã xóa",
        "wikibase-deletedentity-query": "Truy vấn đã xóa",
        "wikibase-error-unexpected": "Lỗi: $1.",
-       "wikibase-error-save-generic": "Đã gặp lỗi khi lưu. Không thể thực hiện 
các thay đổi của bạn.",
-       "wikibase-error-remove-generic": "Đã gặp lỗi khi loại bỏ. Không thể 
thực hiện các thay đổi của bạn.",
-       "wikibase-error-save-connection": "Đã gặp lỗi kết nối khi lưu. Không 
thể thực hiện các thay đổi của bạn. Xin hãy kiểm tra kết nối Internet của bạn.",
-       "wikibase-error-remove-connection": "Đã gặp lỗi khi loại bỏ. Không thể 
thực hiện các thay đổi của bạn. Xin hãy kiểm tra kết nối Internet của bạn.",
+       "wikibase-error-save-generic": "Không thể lưu vì xuất hiện lỗi.",
+       "wikibase-error-remove-generic": "Không thể loại bỏ vì xuất hiện lỗi.",
+       "wikibase-error-save-connection": "Không thể lưu vì lỗi kết nối. Xin 
hãy kiểm tra kết nối Internet của bạn.",
+       "wikibase-error-remove-connection": "Không thể loại bỏ vì lỗi kết nối. 
Xin hãy kiểm tra kết nối Internet của bạn.",
        "wikibase-error-save-timeout": "Chúng tôi đang gặp trục trặc kỹ thuật. 
Không thể thực hiện tác vụ lưu của bạn.",
        "wikibase-error-remove-timeout": "Chúng tôi đang gặp trục trặc kỹ 
thuật. Không thể thực hiện tác vụ loại bỏ của bạn.",
        "wikibase-error-autocomplete-connection": "Không thể truy vấn API của 
dịch vụ. Xin hãy thử lại sau.",
@@ -66,8 +66,9 @@
        "wikibase-validator-bad-value": "Giá trị dữ liệu bị hỏng: $1",
        "wikibase-validator-bad-value-type": "Kiểu giá trị không hợp lệ $1; 
đáng lẽ phải là $2",
        "wikibase-validator-bad-data-type": "Kiểu dữ liệu không hợp lệ: $1",
-       "wikibase-validator-bad-url": "URL hỏng: $1",
-       "wikibase-validator-bad-url-scheme": "Giao thức URL không được hỗ trợ: 
$1",
+       "wikibase-validator-bad-url": "URL không thể chứa những ký tự như dấu 
cách và dấu ngoặc vuông.",
+       "wikibase-validator-url-scheme-missing": "URL này thiếu giao thức chẳng 
hạn “http://” hoặc “https://”.";,
+       "wikibase-validator-bad-url-scheme": "Giao thức URL “$1” không được hỗ 
trợ.",
        "wikibase-validator-unknown-unit": "Đơn vị không rõ: $1",
        "wikibase-validator-not-allowed": "Giá trị không hợp lệ: $1",
        "wikibase-validator-no-validators": "Cấm",
diff --git a/extensions/Wikibase/lib/includes/LanguageFallbackChainFactory.php 
b/extensions/Wikibase/lib/includes/LanguageFallbackChainFactory.php
index 5b056d8..eeee25a 100644
--- a/extensions/Wikibase/lib/includes/LanguageFallbackChainFactory.php
+++ b/extensions/Wikibase/lib/includes/LanguageFallbackChainFactory.php
@@ -7,6 +7,7 @@
 use InvalidArgumentException;
 use Language;
 use LanguageConverter;
+use LogicException;
 use MWException;
 use User;
 
@@ -52,18 +53,9 @@
        private $userLanguageCache;
 
        /**
-        * @var bool
+        * @var callback
         */
-       private $anonymousPageViewCached;
-
-       /**
-        * @param bool $anonymousPageViewCached Whether full page outputs are 
cached for anons, so some
-        *                                      fine-grained fallbacks 
shouldn't be used for them.
-        */
-       public function __construct( $anonymousPageViewCached = false ) {
-               // @fixme fix instantiation of factory in various lib classes
-               $this->anonymousPageViewCached = $anonymousPageViewCached;
-       }
+       private $getLanguageFallbacksFor = 'Language::getFallbacksFor';
 
        /**
         * Get the fallback chain based a single language, and specified 
fallback level.
@@ -175,7 +167,9 @@
                        $recursiveMode = $mode;
                        $recursiveMode &= self::FALLBACK_VARIANTS;
                        $recursiveMode |= self::FALLBACK_SELF;
-                       foreach ( Language::getFallbacksFor( $languageCode ) as 
$other ) {
+
+                       $fallbacks = call_user_func( 
$this->getLanguageFallbacksFor, $languageCode );
+                       foreach ( $fallbacks as $other ) {
                                $this->buildFromLanguage( $other, 
$recursiveMode, $chain, $fetched );
                        }
                }
@@ -321,4 +315,17 @@
                return $chain;
        }
 
+       /**
+        * @param callable $getLanguageFallbacksFor
+        */
+       public function setGetLanguageFallbacksFor( $getLanguageFallbacksFor ) {
+               if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+                       throw new LogicException(
+                               'Overriding the getLanguageFallbacksFor 
function is only supported in test mode'
+                       );
+               }
+
+               $this->getLanguageFallbacksFor = $getLanguageFallbacksFor;
+       }
+
 }
diff --git 
a/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php 
b/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
index f56b748..84dd2a1 100644
--- a/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
+++ b/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Test;
 
 use Language;
+use MediaWikiTestCase;
 use MWException;
 use RequestContext;
 use User;
@@ -18,7 +19,7 @@
  * @license GPL-2.0+
  * @author Liangent < liang...@gmail.com >
  */
-class LanguageFallbackChainFactoryTest extends \MediaWikiTestCase {
+class LanguageFallbackChainFactoryTest extends MediaWikiTestCase {
 
        /**
         * @param array $expectedItems
@@ -45,12 +46,58 @@
                ) );
        }
 
+       private function getLanguageFallbackChainFactory() {
+               $factory = new LanguageFallbackChainFactory();
+               $factory->setGetLanguageFallbacksFor( function( $code ) {
+                       return $this->getLanguageFallbacksForCallback( $code );
+               } );
+
+               return $factory;
+       }
+
+       /**
+        * This captures the state of language fallbacks from 2016-08-17.
+        * There's no need for this to be exactly up to date with MediaWiki,
+        * we just need a data base to test with.
+        *
+        * @param string $code
+        *
+        * @return string[]
+        */
+       private function getLanguageFallbacksForCallback( $code ) {
+               switch ( $code ) {
+                       case 'en':
+                               return array();
+                       case 'de':
+                               return array( 'en' );
+                       case 'de-formal':
+                               return array( 'de', 'en' );
+                       case 'zh':
+                               return array( 'zh-hans', 'en' );
+                       case 'zh-cn':
+                               return array( 'zh-hans', 'en' );
+                       case 'ii':
+                               return array( 'zh-cn', 'zh-hans', 'en' );
+                       case 'lzh':
+                               return array( 'en' );
+                       case 'kk-cn':
+                               return array( 'kk-arab', 'kk-cyrl', 'en' );
+                       case 'zh-hk':
+                               return array( 'zh-hant', 'zh-hans', 'en' );
+                       case 'kk':
+                               return array( 'kk-cyrl', 'en' );
+                       default:
+                               // Language::getFallbacksFor returns array( 
'en' ) if $code is unknown
+                               return array( 'en' );
+               }
+       }
+
        /**
         * @dataProvider providerNewFromLanguage
         */
        public function testNewFromLanguage( $lang, $mode, $expected, 
$disabledVariants = array() ) {
                $this->setupDisabledVariants( $disabledVariants );
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $chain = $factory->newFromLanguage( Language::factory( $lang ), 
$mode )->getFallbackChain();
                $this->assertChainEquals( $expected, $chain );
        }
@@ -60,7 +107,7 @@
         */
        public function testNewFromLanguageCode( $lang, $mode, $expected, 
$disabledVariants = array() ) {
                $this->setupDisabledVariants( $disabledVariants );
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $chain = $factory->newFromLanguageCode( $lang, $mode 
)->getFallbackChain();
                $this->assertChainEquals( $expected, $chain );
        }
@@ -199,7 +246,7 @@
         * @expectedException MWException
         */
        public function testNewFromLanguageCodeException( $langCode ) {
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $factory->newFromLanguageCode( $langCode );
        }
 
@@ -211,13 +258,13 @@
        }
 
        public function testNewFromContext() {
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $languageFallbackChain = $factory->newFromContext( 
RequestContext::getMain() );
                $this->assertTrue( $languageFallbackChain instanceof 
LanguageFallbackChain );
        }
 
        public function testNewFromContextAndLanguageCode() {
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $languageFallbackChain = 
$factory->newFromContextAndLanguageCode( RequestContext::getMain(), 'en' );
                $this->assertTrue( $languageFallbackChain instanceof 
LanguageFallbackChain );
        }
@@ -231,7 +278,7 @@
                        return;
                }
                $this->setupDisabledVariants( $disabledVariants );
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $anon = new User();
                $chain = $factory->newFromUserAndLanguageCode( $anon, $lang 
)->getFallbackChain();
                $this->assertChainEquals( $expected, $chain );
@@ -241,7 +288,7 @@
         * @dataProvider provideTestFromBabel
         */
        public function testBuildFromBabel( $babel, $expected ) {
-               $factory = new LanguageFallbackChainFactory();
+               $factory = $this->getLanguageFallbackChainFactory();
                $chain = $factory->buildFromBabel( $babel );
                $this->assertChainEquals( $expected, $chain );
        }
diff --git a/extensions/Wikibase/repo/i18n/ar.json 
b/extensions/Wikibase/repo/i18n/ar.json
index 900d42e..69322e7 100644
--- a/extensions/Wikibase/repo/i18n/ar.json
+++ b/extensions/Wikibase/repo/i18n/ar.json
@@ -19,7 +19,8 @@
                        "Yahya Sakhnini",
                        "Mervat Salman",
                        "Shbib Al-Subaie",
-                       "Maroen1990"
+                       "Maroen1990",
+                       "بدارين"
                ]
        },
        "wikibase-desc": "مستودع بيانات مهيكلة",
@@ -66,7 +67,7 @@
        "wikibase-sitelinks-counter": "$1{{PLURAL:$2|0=|$3+$2$4}} 
{{PLURAL:$1|لا مدخلات|مدخلة واحدة|مدخلتان|$1 مدخلات|$1 مدخلة}}",
        "wikibase-sitelinks-empty": "لا ترتبط أي صفحات بهذا العنصر بعد.",
        "wikibase-sitelinks-special": "مواقع أخرى",
-       "wikibase-remove": "ألغ",
+       "wikibase-remove": "حذف",
        "wikibase-move-up": "تحريك للأعلى",
        "wikibase-move-down": "تحريك للأسفل",
        "wikibase-undo-title": "الرجوع عن التعديل إلى \"$1\"",
diff --git a/extensions/Wikibase/repo/i18n/mk.json 
b/extensions/Wikibase/repo/i18n/mk.json
index dd54da9..81ec345 100644
--- a/extensions/Wikibase/repo/i18n/mk.json
+++ b/extensions/Wikibase/repo/i18n/mk.json
@@ -387,8 +387,20 @@
        "apihelp-wbsearchentities-param-type": "Пребарај го овој тип единица.",
        "apihelp-wbsearchentities-param-limit": "Макс. број на резултати",
        "apihelp-wbsearchentities-param-continue": "Од каде да се продолжи со 
пребарувањето",
+       "apihelp-query+wbsearch-param-search": "Побарајте го текстов.",
+       "apihelp-query+wbsearch-param-language": "Пребарајте на овој јазик.",
+       "apihelp-query+wbsearch-param-strictlanguage": "Дали се се исклучи 
резервниот јазик",
+       "apihelp-query+wbsearch-param-type": "Побарајте го овој вид единица.",
+       "apihelp-query+wbsearch-param-limit": "Макс. број на резултати",
+       "apihelp-query+wbsearch-example-1": "Пребарајте „abc“ на англиски, со 
основни задавања за тип и ограничување",
+       "apihelp-query+wbsearch-example-2": "Пребарајте „abc“ на англиски, со 
ограничување 50",
+       "apihelp-query+wbsearch-example-3": "Пребарајте „alphabet“ на англиски 
за типско својство",
+       "apihelp-wbsetaliases-description": "Ги задава истозначниците за 
единица во Викибазата.",
+       "apihelp-wbsetaliases-param-id": "Назнаката на единицата, вклучувајќи 
ја претставката.\nКористете или <var>id</var> или <var>site</var> заедно со 
<var>title</var>.",
        "apihelp-wbsetclaim-param-claim": "Серијализација на искази или 
тврдења",
        "apihelp-wbsetclaimvalue-param-snaktype": "Типот на спојницата",
+       "apihelp-wbsetdescription-param-language": "Јазик на описот",
+       "apihelp-wbsetdescription-param-value": "Вредноста што му се задава на 
описот",
        "apihelp-wbsetlabel-param-language": "Јазик на натписот",
        "apihelp-wbsetlabel-param-value": "Вредноста на натписот",
        "apihelp-wbsetsitelink-example-4": "Отстрани ја германската викиврска 
од предметот",
diff --git a/extensions/Wikibase/repo/i18n/vi.json 
b/extensions/Wikibase/repo/i18n/vi.json
index 2e67e24..ff644d3 100644
--- a/extensions/Wikibase/repo/i18n/vi.json
+++ b/extensions/Wikibase/repo/i18n/vi.json
@@ -31,7 +31,7 @@
        "wikibase-entitytermsforlanguagelistview-description": "Miêu tả",
        "wikibase-entitytermsforlanguagelistview-label": "Nhãn",
        "wikibase-entitytermsforlanguagelistview-language": "Ngôn ngữ",
-       "wikibase-entitytermsforlanguagelistview-more": "Thêm ngôn ngữ",
+       "wikibase-entitytermsforlanguagelistview-more": "Tất cả các ngôn ngữ 
được nhập",
        "wikibase-entitytermsforlanguagelistview-less": "Ít ngôn ngữ hơn",
        "wikibase-label-empty": "Không định rõ nhãn.",
        "wikibase-label-edit-placeholder": "nhập nhãn",
@@ -104,6 +104,7 @@
        "wikibase-shortcopyrightwarning": "Với việc bấm nút “$1”, bạn chấp nhận 
[[$2|các điều khoản sử dụng]], và bạn đồng ý phát hành, một cách không thể hủy 
bỏ, đóng góp của mình theo $3.",
        "wikibase-copyrighttooltip-acknowledge": "Tôi chấp nhận các điều khoản 
này đối với các sửa đổi của tôi trong tương lai. Từ nay bỏ qua thông báo này.",
        "wikibase-entityselector-more": "thêm",
+       "wikibase-entityselector-notfound": "Không tìm thấy kết quả",
        "wikibase-anonymouseditwarning": "Cảnh báo: Bạn chưa đăng nhập.\nĐịa 
chỉ IP của bạn sẽ được ghi lại trong lịch sử sửa đổi của thực thể này.",
        "wikibase-move-error": "Không thể di chuyển các trang trong một không 
gian tên dữ liệu và không thể di chuyển trang khác vào không gian tên này.",
        "wikibase-validator-sitelink-conflict": "Liên kết $1 đã được sử dụng 
bởi khoản mục $2. Nếu $2 không nên có liên kết này, hãy loại bỏ nó; nếu $2 và 
khoản mục này cùng đề tài, hãy hợp nhất các khoản mục.",
@@ -151,6 +152,8 @@
        "wikibase-newproperty-fieldset": "Tạo thuộc tính mới",
        "wikibase-newproperty-datatype": "Kiểu dữ liệu:",
        "wikibase-newproperty-invalid-datatype": "Đã định rõ một kiểu dữ liệu 
không hợp lệ.",
+       "wikibase-description-helppage": "Help:Miêu tả",
+       "wikibase-label-helppage": "Help:Nhãn",
        "special-newitem": "Tạo khoản mục mới",
        "wikibase-newitem-summary": "Hãy nhớ [[Special:Search|kiểm tra thuộc 
tính này có tồn tại chưa]]!<br />Hãy đặt 
[[{{int:Wikibase-label-helppage}}|nhãn]] và 
[[{{int:Wikibase-description-helppage}}|miêu tả]] cho mọi thuộc tính mới.",
        "wikibase-newitem-fieldset": "Tạo khoản mục mới",
diff --git a/extensions/Wikibase/repo/i18n/zh-hant.json 
b/extensions/Wikibase/repo/i18n/zh-hant.json
index 82035e2..4d56b7c 100644
--- a/extensions/Wikibase/repo/i18n/zh-hant.json
+++ b/extensions/Wikibase/repo/i18n/zh-hant.json
@@ -16,7 +16,8 @@
                        "Zhxy 519",
                        "飞舞回堂前",
                        "Gi25ni",
-                       "一個正常人"
+                       "一個正常人",
+                       "Kanashimi"
                ]
        },
        "wikibase-desc": "結構化資料儲存庫",
@@ -312,6 +313,7 @@
        "wikibase-listdatatypes-time-body": 
"時間值的原始資料字段。給出一個含精度及邊界的時間。時間於內部儲存為外推格里高利歷的格式,但在解析及排版時可用其他格式。\n*時間 – 時間點的明確值,根據 
ISO8601,年都表示為 11 位數字且日期均帶有符號,格式為+00000002013-01-01T00:00:00Z\n*時區 – 
明確有符號的整數。時區信息是以分為單位以國際標準時間 (UTC) 為基準的一個偏移量。\n*之前 – 
表示它發生時可能晚於給定時間多少單位。單位由精度給定。\n*之後 – 表示它發生時可能早於給定時間多少單位。單位由精度給定。\n*精度 – 
編碼為短整數的明確值。這些數值有以下意義:0-十億年、1-億年、…、6-千年、7-世紀、8-十年、9-年、10-月、11-日、12-時、13-分、14-秒。\n*日曆模型
 – 由一個 URI 給定的明確值。它可以確定用於顯示時間值的日曆模型。",
        "wikibase-listdatatypes-url-head": "URL",
        "wikibase-listdatatypes-url-body": "一個 URL 的文字字元。URL 
被限制於外部連結的方式寫於維基文字中。",
+       "wikibase-listdatatypes-external-id-head": "外部識別符",
        "wikibase-concept-uri": "概念 URI",
        "wikibase-concept-uri-tooltip": "URI 用來辦識此項目所描述的概念",
        "datatypes-type-url": "URL",
diff --git a/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php 
b/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php
index 8cccad6..b6cdf71 100644
--- a/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php
+++ b/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php
@@ -150,7 +150,11 @@
                // If a base revision is given, use if for consistency!
                $baseRev = isset( $params['baserevid'] )
                        ? (int)$params['baserevid']
-                       : $this->defaultRetrievalMode;
+                       : 0;
+
+               if ( $baseRev === 0 ) {
+                       $baseRev = $this->defaultRetrievalMode;
+               }
 
                if ( $entityId ) {
                        $entityRevision = $this->loadEntityRevision( $entityId, 
$baseRev );
diff --git a/extensions/Wikibase/repo/includes/WikibaseRepo.php 
b/extensions/Wikibase/repo/includes/WikibaseRepo.php
index 577e71a..dc52b62 100644
--- a/extensions/Wikibase/repo/includes/WikibaseRepo.php
+++ b/extensions/Wikibase/repo/includes/WikibaseRepo.php
@@ -806,14 +806,7 @@
         */
        public function getLanguageFallbackChainFactory() {
                if ( $this->languageFallbackChainFactory === null ) {
-                       global $wgUseSquid;
-
-                       // The argument is about whether full page output 
(OutputPage, specifically JS vars in
-                       // it currently) is cached for anons, where the only 
caching mechanism in use now is
-                       // Squid.
-                       $anonymousPageViewCached = $wgUseSquid;
-
-                       $this->languageFallbackChainFactory = new 
LanguageFallbackChainFactory( $anonymousPageViewCached );
+                       $this->languageFallbackChainFactory = new 
LanguageFallbackChainFactory();
                }
 
                return $this->languageFallbackChainFactory;
diff --git a/extensions/Wikidata.org/i18n/jv.json 
b/extensions/Wikidata.org/i18n/jv.json
new file mode 100644
index 0000000..cb23cc2
--- /dev/null
+++ b/extensions/Wikidata.org/i18n/jv.json
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "NoiX180"
+               ]
+       },
+       "data-access": "Aksès data"
+}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 7166c70..79efbca 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -110,19 +110,19 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-            "reference": "ae217d202fa5c5bc88fca5ccc4217259fd222635"
+            "reference": "2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/ae217d202fa5c5bc88fca5ccc4217259fd222635";,
-            "reference": "ae217d202fa5c5bc88fca5ccc4217259fd222635",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e";,
+            "reference": "2fa8987bbf2daace8bae00cf1f4f0d02a9d0b47e",
             "shasum": ""
         },
         "require-dev": {
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.7.2"
         },
-        "time": "2016-08-21 01:35:44",
+        "time": "2016-08-24 08:30:24",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {
@@ -1397,12 +1397,12 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "6c0f4c537ec4dd5c16e047b44f358cead5767d09"
+            "reference": "7c19c5037aee83d9eda90da0bdff9a00d21aa521"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/6c0f4c537ec4dd5c16e047b44f358cead5767d09";,
-            "reference": "6c0f4c537ec4dd5c16e047b44f358cead5767d09",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7c19c5037aee83d9eda90da0bdff9a00d21aa521";,
+            "reference": "7c19c5037aee83d9eda90da0bdff9a00d21aa521",
             "shasum": ""
         },
         "require": {
@@ -1435,7 +1435,7 @@
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
         },
-        "time": "2016-08-22 13:08:13",
+        "time": "2016-08-24 09:29:21",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {
@@ -1528,7 +1528,7 @@
         "source": {
             "type": "git",
             "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikidata.org";,
-            "reference": "1b9d7f9e5bc1fefa687f2c71007ca6e6b9d0aa41"
+            "reference": "30e1d291968695b6ce4da45b82e85a331f94f739"
         },
         "require": {
             "php": ">=5.3.0"
@@ -1537,7 +1537,7 @@
             "jakub-onderka/php-parallel-lint": "0.9.2",
             "mediawiki/mediawiki-codesniffer": "0.7.2"
         },
-        "time": "2016-08-05 20:35:51",
+        "time": "2016-08-24 08:38:59",
         "type": "mediawiki-extension",
         "installation-source": "source",
         "autoload": {

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

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

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

Reply via email to