Aude has uploaded a new change for review.

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

Change subject: Update Wikidata, fix suggester and autocomment formatting
......................................................................

Update Wikidata, fix suggester and autocomment formatting

Change-Id: Ia14590219af3b03a66c3f68986a918eb303a6e7a
---
M composer.json
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/Wikibase/repo/Wikibase.hooks.php
M extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php
M vendor/composer/installed.json
8 files changed, 90 insertions(+), 77 deletions(-)


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

diff --git a/composer.json b/composer.json
index 539c364..36522dd 100644
--- a/composer.json
+++ b/composer.json
@@ -29,8 +29,8 @@
         "post-update-cmd": 
"Wikidata\\SettingsFileGenerator::generateDefaultSettings"
     },
     "config": {
-        "prepend-autoloader": false,
+       "prepend-autoloader": false,
         "preferred-install": "dist",
         "autoloader-suffix": "wikidata_1_25wmf14"
     }
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index 688e927..2ea9f82 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "6de233ea57f3c021103737043a9f2c50",
+    "hash": "2a3db648f758c4bad709c468719811de",
     "packages": [
         {
             "name": "composer/installers",
@@ -752,16 +752,16 @@
         },
         {
             "name": "propertysuggester/property-suggester",
-            "version": "2.0.3",
+            "version": "2.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Wikidata-lib/PropertySuggester.git";,
-                "reference": "d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202"
+                "reference": "9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202";,
-                "reference": "d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202",
+                "url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4";,
+                "reference": "9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4",
                 "shasum": ""
             },
             "require": {
@@ -793,7 +793,7 @@
                 "wikibase",
                 "wikidata"
             ],
-            "time": "2015-01-06 13:02:51"
+            "time": "2015-01-13 21:43:28"
         },
         {
             "name": "serialization/serialization",
@@ -1230,12 +1230,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "f506ebce3efe05a7447db83e0f19b7e96a0bcf03"
+                "reference": "4842cc0bc788c31b6cb1a5b9375fd43c233d219a"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/f506ebce3efe05a7447db83e0f19b7e96a0bcf03";,
-                "reference": "f506ebce3efe05a7447db83e0f19b7e96a0bcf03",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/4842cc0bc788c31b6cb1a5b9375fd43c233d219a";,
+                "reference": "4842cc0bc788c31b6cb1a5b9375fd43c233d219a",
                 "shasum": ""
             },
             "require": {
@@ -1302,7 +1302,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2015-01-12 11:22:17"
+            "time": "2015-01-13 20:27:42"
         },
         {
             "name": "wikibase/wikimedia-badges",
diff --git a/extensions/PropertySuggester/PropertySuggester.php 
b/extensions/PropertySuggester/PropertySuggester.php
index 4128ebc..1573fd0 100644
--- a/extensions/PropertySuggester/PropertySuggester.php
+++ b/extensions/PropertySuggester/PropertySuggester.php
@@ -9,7 +9,7 @@
        return;
 }
 
-define( 'PropertySuggester_VERSION', '2.0.3' );
+define( 'PropertySuggester_VERSION', '2.0.4' );
 
 if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
        require_once __DIR__ . '/vendor/autoload.php';
diff --git a/extensions/PropertySuggester/README.md 
b/extensions/PropertySuggester/README.md
index 9a4f418..c735ea2 100644
--- a/extensions/PropertySuggester/README.md
+++ b/extensions/PropertySuggester/README.md
@@ -44,6 +44,9 @@
 
 ## Release notes
 
+### 2.0.4 (2015-01-13)
+* Adjust to changes in ValueView 0.10.0.
+
 ### 2.0.3 (2015-01-06)
 * Adjust to removal of claimview
 
diff --git 
a/extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js 
b/extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
index 2bb3341..6957058 100644
--- 
a/extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
+++ 
b/extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
@@ -26,9 +26,9 @@
                        var focusHandler = function( event ) {
                                if( self._useSuggester() && self.element.val() 
=== ''
                                        && !self.options.menu.element.is( 
":visible" ) ) {
-                                       self._minTermLength = 0;
+                                       self.options.minTermLength = 0;
                                        self._cache = {}; // is done in the 
entityselector on eachchange too
-                                       self.search( event );
+                                       self.search();
                                }
                        };
                        self.element.on( 'focus', focusHandler );
diff --git a/extensions/Wikibase/repo/Wikibase.hooks.php 
b/extensions/Wikibase/repo/Wikibase.hooks.php
index 1e18ad0..3c3bb5c 100644
--- a/extensions/Wikibase/repo/Wikibase.hooks.php
+++ b/extensions/Wikibase/repo/Wikibase.hooks.php
@@ -898,9 +898,9 @@
         *
         * @param string[] $data
         * @param string $comment reference to the finalized autocomment
-        * @param string $pre the string before the autocomment
+        * @param string|bool $pre content before the autocomment
         * @param string $auto the autocomment unformatted
-        * @param string $post the string after the autocomment
+        * @param string|bool $post content after the autocomment
         * @param Title|null $title use for further information
         * @param bool $local shall links be generated locally or globally
         *
@@ -931,17 +931,27 @@
                                $auto = $msg->params( $args )->parse();
 
                                // add pre and post fragments
-                               if ( $pre !== '' ) {
+                               if ( $pre === true ) {
+                                       // written summary $presep autocomment 
(summary /* section */)
+                                       $pre = wfMessage( 'autocomment-prefix' 
)->escaped();
+                               } elseif ( $pre !== '' && $pre !== false ) {
                                        // written summary $presep autocomment 
(summary /* section */)
                                        $pre .= wfMessage( 'autocomment-prefix' 
)->escaped();
+                               } elseif ( $pre === false ) {
+                                       $pre = '';
                                }
-                               if ( $post !== '' ) {
+                               if ( $post !== '' && $post !== false ) {
                                        // autocomment $postsep written summary 
(/* section */ summary)
                                        $auto .= wfMessage( 'colon-separator' 
)->escaped();
+                                       if ( $post === true ) {
+                                               $post = '';
+                                       }
+                               } elseif ( $post === false ) {
+                                       $post = '';
                                }
 
                                $auto = '<span class="autocomment">' . $auto . 
'</span>';
-                               $comment = $pre . $wgLang->getDirMark() . 
'<span dir="auto">' . $auto . $post . '</span>';
+                               $comment = $pre . $wgLang->getDirMark() . 
'<span dir="auto">' . $auto . '</span>' . $post;
                        }
                }
 
diff --git 
a/extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php 
b/extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php
index 65cb095..3d4f047 100644
--- a/extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php
+++ b/extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php
@@ -365,7 +365,7 @@
                                'foo', 'wbeditentity', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?</span></span>bar!'
                        ),
                        array(
                                CONTENT_MODEL_WIKIBASE_ITEM,
@@ -373,7 +373,7 @@
                                'foo', 'wbsetlabel-set:1|en', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[en\].*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[en\].*?</span></span>bar!'
                        ),
                        array(
                                CONTENT_MODEL_WIKIBASE_ITEM,
@@ -381,7 +381,7 @@
                                'foo', 'wbsetlabel-set:1|<>', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&lt;&gt;\].*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&lt;&gt;\].*?</span></span>bar!'
                        ),
                        array(
                                CONTENT_MODEL_WIKIBASE_ITEM,
@@ -389,7 +389,7 @@
                                'foo', 'wbsetlabel-set:1|&lt;&gt;', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&lt;&gt;\].*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&lt;&gt;\].*?</span></span>bar!'
                        ),
                        array(
                                CONTENT_MODEL_WIKIBASE_ITEM,
@@ -397,7 +397,7 @@
                                'foo', 'wbsetlabel-set:1|&', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&amp;\].*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[&amp;\].*?</span></span>bar!'
                        ),
                        array(
                                CONTENT_MODEL_WIKIBASE_ITEM,
@@ -405,7 +405,7 @@
                                'foo', 'wbsetlabel-set:1|…', 'bar',
                                'Title',
                                false,
-                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[…\].*?</span>bar</span>!'
+                               '!foo‎<span dir="auto"><span 
class="autocomment">.*?\[…\].*?</span></span>bar!'
                        )
                );
        }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 937c3ba..6ac3d42 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -95,53 +95,6 @@
         ]
     },
     {
-        "name": "propertysuggester/property-suggester",
-        "version": "2.0.3",
-        "version_normalized": "2.0.3.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/Wikidata-lib/PropertySuggester.git";,
-            "reference": "d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202"
-        },
-        "dist": {
-            "type": "zip",
-            "url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202";,
-            "reference": "d29d2c91191a40e8d0eb0a3eaaaccc6c6c989202",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.0"
-        },
-        "require-dev": {
-            "phpunit/phpunit": "3.7.*",
-            "satooshi/php-coveralls": "dev-master"
-        },
-        "time": "2015-01-06 13:02:51",
-        "type": "mediawiki-extension",
-        "installation-source": "dist",
-        "autoload": {
-            "psr-4": {
-                "PropertySuggester\\": "src/PropertySuggester/"
-            },
-            "files": [],
-            "classmap": [
-                "PropertySuggesterHooks.php",
-                "maintenance/UpdateTable.php"
-            ]
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "license": [
-            "GPL-2.0+"
-        ],
-        "description": "Extension for Wikibase to provide usefull suggestions 
for new properties",
-        "homepage": "https://github.com/Wikidata-lib/PropertySuggester";,
-        "keywords": [
-            "propertysuggester",
-            "wikibase",
-            "wikidata"
-        ]
-    },
-    {
         "name": "wikibase/easyrdf_lite",
         "version": "0.8.1",
         "version_normalized": "0.8.1.0",
@@ -1316,18 +1269,65 @@
         }
     },
     {
+        "name": "propertysuggester/property-suggester",
+        "version": "2.0.4",
+        "version_normalized": "2.0.4.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/Wikidata-lib/PropertySuggester.git";,
+            "reference": "9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4"
+        },
+        "dist": {
+            "type": "zip",
+            "url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4";,
+            "reference": "9aab4d31e44a8dc07c0cff60ae27b5e1f1671ff4",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.0"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "3.7.*",
+            "satooshi/php-coveralls": "dev-master"
+        },
+        "time": "2015-01-13 21:43:28",
+        "type": "mediawiki-extension",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "PropertySuggester\\": "src/PropertySuggester/"
+            },
+            "files": [],
+            "classmap": [
+                "PropertySuggesterHooks.php",
+                "maintenance/UpdateTable.php"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/";,
+        "license": [
+            "GPL-2.0+"
+        ],
+        "description": "Extension for Wikibase to provide usefull suggestions 
for new properties",
+        "homepage": "https://github.com/Wikidata-lib/PropertySuggester";,
+        "keywords": [
+            "propertysuggester",
+            "wikibase",
+            "wikidata"
+        ]
+    },
+    {
         "name": "wikibase/wikibase",
         "version": "dev-wmf/1.25wmf14",
         "version_normalized": "dev-wmf/1.25wmf14",
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "f506ebce3efe05a7447db83e0f19b7e96a0bcf03"
+            "reference": "4842cc0bc788c31b6cb1a5b9375fd43c233d219a"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/f506ebce3efe05a7447db83e0f19b7e96a0bcf03";,
-            "reference": "f506ebce3efe05a7447db83e0f19b7e96a0bcf03",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/4842cc0bc788c31b6cb1a5b9375fd43c233d219a";,
+            "reference": "4842cc0bc788c31b6cb1a5b9375fd43c233d219a",
             "shasum": ""
         },
         "require": {
@@ -1355,7 +1355,7 @@
         "conflict": {
             "mediawiki/mediawiki": "<1.23"
         },
-        "time": "2015-01-12 11:22:17",
+        "time": "2015-01-13 20:27:42",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia14590219af3b03a66c3f68986a918eb303a6e7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.25wmf14
Gerrit-Owner: Aude <[email protected]>

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

Reply via email to