[MediaWiki-commits] [Gerrit] Added stubs to QueryStoreUpdater - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52362 Change subject: Added stubs to QueryStoreUpdater .. Added stubs to QueryStoreUpdater Change-Id: I446cbea75417a6834a600ff0adbec31d38b931a8 --- M repo/includes/Query/QueryStoreUpdater.php M repo/includes/Query/SQLStore/Updater.php M repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php 3 files changed, 73 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/62/52362/1 diff --git a/repo/includes/Query/QueryStoreUpdater.php b/repo/includes/Query/QueryStoreUpdater.php index 533f551..33713d8 100644 --- a/repo/includes/Query/QueryStoreUpdater.php +++ b/repo/includes/Query/QueryStoreUpdater.php @@ -2,6 +2,8 @@ namespace Wikibase\Repo\Query; +use Wikibase\Entity; + /** * Updater for a query store. * Implementing objects provide an interface via which new data can be inserted @@ -32,6 +34,31 @@ */ interface QueryStoreUpdater { - // TODO + /** +* @see QueryStoreUpdater::insertEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function insertEntity( Entity $entity ); + + /** +* @see QueryStoreUpdater::updateEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function updateEntity( Entity $entity ); + + /** +* @see QueryStoreUpdater::deleteEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function deleteEntity( Entity $entity ); } diff --git a/repo/includes/Query/SQLStore/Updater.php b/repo/includes/Query/SQLStore/Updater.php index 06a03d2..15aae88 100644 --- a/repo/includes/Query/SQLStore/Updater.php +++ b/repo/includes/Query/SQLStore/Updater.php @@ -4,6 +4,7 @@ use Wikibase\Repo\Query\QueryStoreUpdater; use Wikibase\Repo\Database\QueryInterface; +use Wikibase\Entity; /** * Class responsible for writing information to the SQLStore. @@ -60,6 +61,39 @@ $this-queryInterface = $queryInterface; } + /** +* @see QueryStoreUpdater::insertEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function insertEntity( Entity $entity ) { + // TODO + } + + /** +* @see QueryStoreUpdater::updateEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function updateEntity( Entity $entity ) { + // TODO + } + + /** +* @see QueryStoreUpdater::deleteEntity +* +* @since wd.qe +* +* @param Entity $entity +*/ + public function deleteEntity( Entity $entity ) { + // TODO + } + // TODO: write methods } diff --git a/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php b/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php index 7eb8675..4db385e 100644 --- a/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php +++ b/repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php @@ -48,7 +48,17 @@ return $this-arrayWrap( $this-getInstances() ); } - public function testFoo() { + public function testInsertEntity() { + // TODO + $this-assertTrue( true ); + } + + public function testUpdateEntity() { + // TODO + $this-assertTrue( true ); + } + + public function testDeleteEntity() { // TODO $this-assertTrue( true ); } -- To view, visit https://gerrit.wikimedia.org/r/52362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I446cbea75417a6834a600ff0adbec31d38b931a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Return correct value for getName in the SQL Store - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52363 Change subject: Return correct value for getName in the SQL Store .. Return correct value for getName in the SQL Store Change-Id: Id04c723c1db73dfd1a9c58bf59f247ded566e3e7 --- M repo/includes/Query/SQLStore/Store.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/63/52363/1 diff --git a/repo/includes/Query/SQLStore/Store.php b/repo/includes/Query/SQLStore/Store.php index af6fbaa..cec286c 100644 --- a/repo/includes/Query/SQLStore/Store.php +++ b/repo/includes/Query/SQLStore/Store.php @@ -88,7 +88,7 @@ * @return string */ public function getName() { - return 'Wikibase SQL store'; + return $this-config-getStoreName(); } /** -- To view, visit https://gerrit.wikimedia.org/r/52363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id04c723c1db73dfd1a9c58bf59f247ded566e3e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added preliminary definition of two non DV tables of the SQL... - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52364 Change subject: Added preliminary definition of two non DV tables of the SQL Store .. Added preliminary definition of two non DV tables of the SQL Store Change-Id: I18153d98625a42a32a1c64a9a4c8a4ac1734d4c5 --- M repo/includes/Database/FieldDefinition.php M repo/includes/Query/SQLStore/Setup.php 2 files changed, 132 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/64/52364/1 diff --git a/repo/includes/Database/FieldDefinition.php b/repo/includes/Database/FieldDefinition.php index d280e5c..2462155 100644 --- a/repo/includes/Database/FieldDefinition.php +++ b/repo/includes/Database/FieldDefinition.php @@ -86,8 +86,23 @@ const TYPE_INTEGER = 'int'; const TYPE_FLOAT = 'float'; + const NOT_NULL = false; + const NULL = true; + + const NO_DEFAULT = null; + + const NO_ATTRIB = null; const ATTRIB_BINARY = 'binary'; const ATTRIB_UNSIGNED = 'unsigned'; + + const NO_INDEX = null; + const INDEX = 'index'; + const INDEX_UNIQUE = 'unique'; + const INDEX_FULLTEXT = 'fulltext'; + const INDEX_PRIMARY = 'primary'; + + const AUTOINCREMENT = true; + const NO_AUTOINCREMENT = false; /** @@ -101,7 +116,7 @@ * * @throws InvalidArgumentException */ - public function __construct( $name, $type, $null = true, $default = null, $attributes = null, $index = null, $autoIncrement = false ) { + public function __construct( $name, $type, $null = self::NULL, $default = self::NO_DEFAULT, $attributes = null, $index = null, $autoIncrement = false ) { if ( !is_string( $name ) ) { throw new InvalidArgumentException( 'The field $name needs to be a string' ); } diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 3a2a670..0d82f63 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -5,6 +5,7 @@ use Wikibase\Repo\Database\TableBuilder; use Wikibase\Repo\Database\QueryInterface; use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; use MessageReporter; /** @@ -131,6 +132,121 @@ } /** +* TODO +* +* @return TableDefinition[] +*/ + private function getNonDVTables() { + $tables = array(); + + // Id map with Wikibase EntityId to internal SQL store id + $tables[] = new TableDefinition( + 'entities', + array( + // Internal id + new FieldDefinition( + 'id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX_PRIMARY, + FieldDefinition::AUTOINCREMENT + ), + + // EntityId type part + new FieldDefinition( + 'type', + FieldDefinition::TYPE_TEXT, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::NO_ATTRIB, + FieldDefinition::INDEX + ), + + // EntityId numerical part + new FieldDefinition( + 'number', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ) + ); + + // Claim id table + $tables[] = new TableDefinition( + 'claims', + array( + // Internal id + new FieldDefinition( + 'id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, +
[MediaWiki-commits] [Gerrit] Added docs to FieldDefinition - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52365 Change subject: Added docs to FieldDefinition .. Added docs to FieldDefinition Change-Id: I994141647b3c6a84d0dbf8faafc9e8837f097a51 --- M repo/includes/Database/FieldDefinition.php 1 file changed, 58 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/52365/1 diff --git a/repo/includes/Database/FieldDefinition.php b/repo/includes/Database/FieldDefinition.php index 2462155..c8d46e6 100644 --- a/repo/includes/Database/FieldDefinition.php +++ b/repo/includes/Database/FieldDefinition.php @@ -106,6 +106,10 @@ /** +* Constructor. +* +* @since wd.db +* * @param string $name * @param string $type * @param boolean $null @@ -146,32 +150,85 @@ $this-autoIncrement = $autoIncrement; } + /** +* Returns the name of the field. +* +* @since wd.db +* +* @return string +*/ public function getName() { return $this-name; } + /** +* Returns the type of the field. +* This is one of the TYPE_ constants. +* +* @since wd.db +* +* @return string +*/ public function getType() { return $this-type; } + /** +* Returns the default value of the field. +* Null for no default value. +* +* @since wd.db +* +* @return mixed +*/ public function getDefault() { return $this-default; } + /** +* Returns the attributes of the field. +* This is one of the ATTRIB_ constants or null. +* +* @since wd.db +* +* @return string|null +*/ public function getAttributes() { return $this-attributes; } + /** +* Returns if the field allows for the value to be null. +* +* @since wd.db +* +* @return boolean +*/ public function allowsNull() { return $this-null; } + /** +* Returns the index type of the field. +* This is one of the INDEX_ constants or null. +* +* @since wd.db +* +* @return string|null +*/ public function getIndex() { return $this-index; } + /** +* Returns if the field has auto increment. +* +* @since wd.db +* +* @return boolean +*/ public function hasAutoIncrement() { return $this-autoIncrement; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/52365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I994141647b3c6a84d0dbf8faafc9e8837f097a51 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added FieldDefinition::mutateFields - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52366 Change subject: Added FieldDefinition::mutateFields .. Added FieldDefinition::mutateFields Change-Id: I81ab9fbea643403c173094985ba5fcf977af1181 --- M repo/includes/Database/TableDefinition.php M repo/includes/Query/SQLStore/Setup.php M repo/tests/phpunit/includes/Database/TableDefinitionTest.php 3 files changed, 45 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/66/52366/1 diff --git a/repo/includes/Database/TableDefinition.php b/repo/includes/Database/TableDefinition.php index a280d27..00df142 100644 --- a/repo/includes/Database/TableDefinition.php +++ b/repo/includes/Database/TableDefinition.php @@ -70,6 +70,10 @@ $this-fields = array(); foreach ( $fields as $field ) { + if ( !( $field instanceof FieldDefinition ) ) { + throw new InvalidArgumentException( 'All table fields should be of type FieldDefinition' ); + } + if ( array_key_exists( $field-getName(), $this-fields ) ) { throw new InvalidArgumentException( 'A table cannot have two fields with the same name' ); } @@ -124,10 +128,23 @@ * * @return TableDefinition */ - public function getClone( $cloneName ) { + public function mutateName( $cloneName ) { return new self( $cloneName, $this-fields ); } + /** +* Returns a clone of the table, though with the provided fields rather then the original ones. +* +* @since wd.db +* +* @param FieldDefinition[] $fields +* +* @return TableDefinition +*/ + public function mutateFields( array $fields ) { + return new self( $this-name, $fields ); + } + // TODO: multiple field indices } diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 0d82f63..0224934 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -123,7 +123,7 @@ */ foreach ( $this-config-getDataValueHandlers() as $dataValueHandler ) { $table = $dataValueHandler-getTableDefinition(); - $table = $table-getClone( $this-config-getTablePrefix() . $table-getName() ); + $table = $table-mutateName( $this-config-getTablePrefix() . $table-getName() ); $dvTables[] = $table; } diff --git a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php index 28f2bf1..6c229da 100644 --- a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php +++ b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php @@ -121,16 +121,39 @@ * * @param TableDefinition $table */ - public function testGetClone( TableDefinition $table ) { - $newTable = $table-getClone( $table-getName() ); + public function testMutateName( TableDefinition $table ) { + $newTable = $table-mutateName( $table-getName() ); $this-assertInstanceOf( get_class( $table ), $newTable ); $this-assertEquals( $table, $newTable ); - $newTable = $table-getClone( 'foobarbaz' ); + $newTable = $table-mutateName( 'foobarbaz' ); $this-assertEquals( 'foobarbaz', $newTable-getName() ); $this-assertEquals( $table-getFields(), $newTable-getFields() ); } + /** +* @dataProvider instanceProvider +* +* @param TableDefinition $table +*/ + public function testMutateFields( TableDefinition $table ) { + $newTable = $table-mutateFields( $table-getFields() ); + + $this-assertInstanceOf( get_class( $table ), $newTable ); + $this-assertEquals( $table, $newTable ); + + $fields = array( + new FieldDefinition( 'h', FieldDefinition::TYPE_TEXT ), + new FieldDefinition( 'a', FieldDefinition::TYPE_BOOLEAN ), + new FieldDefinition( 'x', FieldDefinition::TYPE_INTEGER ), + ); + + $newTable = $table-mutateFields( $fields ); + + $this-assertEquals( $fields, array_values( $newTable-getFields() ) ); + $this-assertEquals( $table-getName(), $newTable-getName() ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/52366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Work on SQLStore setup - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52367 Change subject: Work on SQLStore setup .. Work on SQLStore setup Change-Id: I9d6b5e39a07f74450deacfb8522be3c0ed56c7b5 --- M repo/includes/Query/SQLStore/Setup.php M repo/includes/Query/SQLStore/StoreConfig.php M repo/tests/phpunit/includes/Query/SQLStore/SetupTest.php 3 files changed, 93 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/67/52367/1 diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 0224934..58d1a44 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -115,6 +115,19 @@ * * @return TableDefinition[] */ + private function getTables() { + // TODO: setup dv tables for different levels of snaks + // TODO: setup id tracking tables + // TODO: setup stats tables + + return array_merge( $this-getNonDVTables(), $this-getDVTables() ); + } + + /** +* TODO +* +* @return TableDefinition[] +*/ private function getDVTables() { $dvTables = array(); @@ -122,10 +135,39 @@ * @var DataValueHandler $dataValueHandler */ foreach ( $this-config-getDataValueHandlers() as $dataValueHandler ) { - $table = $dataValueHandler-getTableDefinition(); - $table = $table-mutateName( $this-config-getTablePrefix() . $table-getName() ); + foreach ( array( 'msnak_', 'qualifier_' ) as $snakLevel ) { + $table = $dataValueHandler-getTableDefinition(); + $table = $table-mutateName( $snakLevel . $table-getName() ); - $dvTables[] = $table; + $table = $table-mutateFields( + array_merge( + array( + // Internal claim id + new FieldDefinition( + 'claim_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Internal property id + new FieldDefinition( + 'property_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ), + $table-getFields() + ) + ); + + $dvTables[] = $table; + } } return $dvTables; @@ -138,6 +180,9 @@ */ private function getNonDVTables() { $tables = array(); + + // TODO: multi field indexes + // TODO: more optimal types // Id map with Wikibase EntityId to internal SQL store id $tables[] = new TableDefinition( @@ -247,6 +292,19 @@ } /** +* Returns the provided table with the configs table prefix prepended to the name of the table. +* +* @since wd.qe +* +* @param TableDefinition $tableDefinition +* +* @return TableDefinition +*/ + private function getPrefixedTable( TableDefinition $tableDefinition ) { + return $tableDefinition-mutateName( $this-config-getTablePrefix() . $tableDefinition-getName() ); + } + + /** * Sets up the tables of the store. * * @since wd.qe @@ -256,13
[MediaWiki-commits] [Gerrit] Make default params to CategoryViewer usable as defaults. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make default params to CategoryViewer usable as defaults. .. Make default params to CategoryViewer usable as defaults. If the '$from' and '$to' parameters to the CategoryViewer constructor are left off, they default to empty arrays. This makes later checks for $from['page'], etc. issue an 'Undefined index' notice. Using 'empty' would be more concise but could hide bugs. Change-Id: I78793d13745d1fc1010b8e6861bdc3a89a39a87f --- M includes/CategoryViewer.php 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 7678ffe..878c371 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -288,10 +288,10 @@ # the collation in the database differs from the one # set in $wgCategoryCollation, pagination might go totally haywire. $extraConds = array( 'cl_type' = $type ); - if ( $this-from[$type] !== null ) { + if ( isset( $this-from[$type] ) $this-from[$type] !== null ) { $extraConds[] = 'cl_sortkey = ' . $dbr-addQuotes( $this-collation-getSortKey( $this-from[$type] ) ); - } elseif ( $this-until[$type] !== null ) { + } elseif ( isset( $this-until[$type] ) $this-until[$type] !== null ) { $extraConds[] = 'cl_sortkey ' . $dbr-addQuotes( $this-collation-getSortKey( $this-until[$type] ) ); $this-flip[$type] = true; @@ -445,9 +445,9 @@ * @return String: HTML output, possibly empty if there are no other pages */ private function getSectionPagingLinks( $type ) { - if ( $this-until[$type] !== null ) { + if ( isset( $this-until[$type] ) $this-until[$type] !== null ) { return $this-pagingLinks( $this-nextPage[$type], $this-until[$type], $type ); - } elseif ( $this-nextPage[$type] !== null || $this-from[$type] !== null ) { + } elseif ( $this-nextPage[$type] !== null || ( isset( $this-from[$type] ) $this-from[$type] !== null ) ) { return $this-pagingLinks( $this-from[$type], $this-nextPage[$type], $type ); } else { return ''; @@ -677,7 +677,9 @@ } $fromOrUntil = false; - if ( $this-from[$pagingType] !== null || $this-until[$pagingType] !== null ) { + if ( ( isset( $this-from[$pagingType] ) $this-from[$pagingType] !== null ) || + ( isset( $this-until[$pagingType] ) $this-until[$pagingType] !== null ) + ) { $fromOrUntil = true; } -- To view, visit https://gerrit.wikimedia.org/r/51812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78793d13745d1fc1010b8e6861bdc3a89a39a87f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: IAlex ialex.w...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use American English spelling for behavior - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use American English spelling for behavior .. Use American English spelling for behavior Spotted in ipbreason-dropdown by Shirayuki. Change-Id: I576ed4bc0abe5ab980aaee3fb9f9e4b43087311f --- M HISTORY M UPGRADE M docs/hooks.txt M includes/Action.php M includes/DefaultSettings.php M includes/EditPage.php M includes/Linker.php M includes/Revision.php M includes/SkinLegacy.php M includes/SpecialPage.php M includes/StringUtils.php M includes/Title.php M includes/WatchedItem.php M includes/ZipDirectoryReader.php M includes/api/ApiParse.php M includes/api/ApiWatch.php M includes/content/Content.php M includes/content/ContentHandler.php M includes/filerepo/README M includes/filerepo/file/ForeignDBFile.php M includes/libs/GenericArrayObject.php M includes/libs/IEUrlExtension.php M includes/objectcache/SqlBagOStuff.php M includes/parser/Parser.php M includes/parser/Preprocessor_DOM.php M includes/parser/Preprocessor_Hash.php M includes/site/MediaWikiSite.php M includes/specials/SpecialFilepath.php M includes/specials/SpecialSearch.php M languages/messages/MessagesEn.php M languages/messages/MessagesGv.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc M maintenance/storage/recompressTracked.php M resources/mediawiki/mediawiki.util.js M skins/common/commonElements.css M tests/RunSeleniumTests.php M tests/parser/parserTests.txt M tests/phpunit/maintenance/MaintenanceTest.php M tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js M tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js 41 files changed, 70 insertions(+), 70 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified Objections: Alex Monk: There's a problem with this change, please improve diff --git a/HISTORY b/HISTORY index 3a25b97..02ba8d8 100644 --- a/HISTORY +++ b/HISTORY @@ -132,7 +132,7 @@ * (bug 39273) Added AJAX support for Show changes (diff) in LivePreview. * Added ResourceLoader module jquery.badge. * mw.util.$content now points to the overall content area in the skin rather than just - page text content area. If you need the old behaviour please use $( '#mw-content-text'). + page text content area. If you need the old behavior please use $( '#mw-content-text'). * jsMessage has been replaced with a floating bubble notification system complete with auto-hide, multi-message support, and message replacement tags. * jquery.messageBox which appears to be unused by both core and extensions has @@ -1135,7 +1135,7 @@ * New maintenance script to refresh image metadata (maintenance/refreshImageMetadata.php). * (bug 16428) Include permalink in printable version. * (bug 30722) Add an identity collation that sorts things based on what the - unicode code point is (aka pre-1.17 behaviour). + unicode code point is (aka pre-1.17 behavior). * (bug 30940) Add a hook in User:getDefaultOptions. To give extensions a better and more flexible way of providing default values for preferences a hook has been introdiced in User:getDefaultOptions(). @@ -2125,7 +2125,7 @@ make wfTempDir() return a sane value for Windows on worst-case. * (bug 24824) Support ImageMagick 6.5.6-2+ JPEG decoder size hint, to reduce memory usage when such an ImageMagick is used for scaling. -* Disable multithreaded behaviour in recent ImageMagick, to avoid a deadlock +* Disable multithreaded behavior in recent ImageMagick, to avoid a deadlock when a resource limit such as $wgMaxShellMemory is hit. * (bug 24981) Allow extensions to access SpecialUpload variables again. * (bug 20744) Wiki forgets about an uploaded file. @@ -2518,8 +2518,8 @@ exist. In that case the URL will get (?|)wpDestFile=filename appended to it as appropriate. * If $wgLocaltimezone is null, use the server's timezone as the default for - signatures. This was always the behaviour documented in DefaultSettings.php - but has not been the actual behaviour for some time: instead, UTC was used + signatures. This was always the behavior documented in DefaultSettings.php + but has not been the actual behavior for some time: instead, UTC was used by default. * Added $wgExtensionAssetsPath, to decouple assets serving from $wgScriptPath. If not specified it will default to $wgScriptPath/extensions @@ -4716,7 +4716,7 @@ * (bug 12644) Template list on edit page now sorted on preview * (bug 14058) Support pipe trick for namespaces and interwikis with - * Message name filter on Special:Allmessages now case-insensitive -* (bug 13943) Fix image redirect behaviour on image pages +* (bug 13943) Fix image redirect behavior on image pages * (bug 14093) Do 'sysop' = 'protect' magic in Title::isValidMoveOperation * (bug 14063) Power search form missing label for redirects check * (bug 14111) Similar filename warning links now lead to correct page @@ -4939,7
[MediaWiki-commits] [Gerrit] Added MonolingualTextHandler - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52368 Change subject: Added MonolingualTextHandler .. Added MonolingualTextHandler Change-Id: Iba9aeb9904d75786d01bbe61b76ed77443188e1b --- M repo/config/Wikibase.experimental.php A repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php A repo/tests/phpunit/includes/Query/SQLStore/DVHandler/MonolingualTextHandlerTest.php 3 files changed, 231 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/68/52368/1 diff --git a/repo/config/Wikibase.experimental.php b/repo/config/Wikibase.experimental.php index ea3015b..1ea0f32 100644 --- a/repo/config/Wikibase.experimental.php +++ b/repo/config/Wikibase.experimental.php @@ -66,6 +66,7 @@ 'Wikibase\Repo\Query\SQLStore\DVHandler\BooleanHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\EntityIdHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\GeoCoordinateHandler', + 'Wikibase\Repo\Query\SQLStore\DVHandler\MonolingualTextHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\NumberHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\StringHandler', @@ -151,6 +152,7 @@ 'Query/SQLStore/DVHandler/BooleanHandler', 'Query/SQLStore/DVHandler/EntityIdHandler', 'Query/SQLStore/DVHandler/GeoCoordinateHandler', + 'Query/SQLStore/DVHandler/MonolingualTextHandler', 'Query/SQLStore/DVHandler/NumberHandler', 'Query/SQLStore/DVHandler/StringHandler', diff --git a/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php b/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php new file mode 100644 index 000..af658d8 --- /dev/null +++ b/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php @@ -0,0 +1,153 @@ +?php + +namespace Wikibase\Repo\Query\SQLStore\DVHandler; + +use Wikibase\Repo\Query\SQLStore\DataValueHandler; +use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; +use DataValues\DataValue; +use DataValues\MonolingualTextValue; +use InvalidArgumentException; + +/** + * Represents the mapping between DataValues\MonolingualTextValue and + * the corresponding table in the store. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since wd.qe + * + * @file + * @ingroup WikibaseSQLStore + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class MonolingualTextHandler extends DataValueHandler { + + /** +* @see DataValueHandler::getTableDefinition +* +* @since wd.qe +* +* @return TableDefinition +*/ + public function getTableDefinition() { + $fields = array( + new FieldDefinition( 'text', FieldDefinition::TYPE_TEXT, false ), + new FieldDefinition( 'language', FieldDefinition::TYPE_TEXT, false ), + new FieldDefinition( 'json', FieldDefinition::TYPE_TEXT, false ), + ); + + return new TableDefinition( 'mono_text', $fields ); + } + + /** +* @see DataValueHandler::getValueFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getValueFieldName() { + return 'json'; + } + + /** +* @see DataValueHandler::getSortFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getSortFieldName() { + return 'text'; + } + + /** +* @see DataValueHandler::getLabelFieldName +* +* @since wd.qe +* +* @return string|null +*/ + public function getLabelFieldName() { + return 'text'; + } + + /** +* @see DataValueHandler::newDataValueFromValueField +* +* @since wd.qe +* +* @param $valueFieldValue // TODO: mixed or string? +* +* @return DataValue +*/ + public function newDataValueFromValueField(
[MediaWiki-commits] [Gerrit] Added IriHandler - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52369 Change subject: Added IriHandler .. Added IriHandler Change-Id: Ic0eaf9d2e6b8e1996209bae5ec91e7061f0bc3bb --- M repo/config/Wikibase.experimental.php A repo/includes/Query/SQLStore/DVHandler/IriHandler.php A repo/tests/phpunit/includes/Query/SQLStore/DVHandler/IriHandlerTest.php 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/69/52369/1 diff --git a/repo/config/Wikibase.experimental.php b/repo/config/Wikibase.experimental.php index 1ea0f32..dac9a88 100644 --- a/repo/config/Wikibase.experimental.php +++ b/repo/config/Wikibase.experimental.php @@ -66,6 +66,7 @@ 'Wikibase\Repo\Query\SQLStore\DVHandler\BooleanHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\EntityIdHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\GeoCoordinateHandler', + 'Wikibase\Repo\Query\SQLStore\DVHandler\IriHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\MonolingualTextHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\NumberHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\StringHandler', @@ -152,6 +153,7 @@ 'Query/SQLStore/DVHandler/BooleanHandler', 'Query/SQLStore/DVHandler/EntityIdHandler', 'Query/SQLStore/DVHandler/GeoCoordinateHandler', + 'Query/SQLStore/DVHandler/IriHandler', 'Query/SQLStore/DVHandler/MonolingualTextHandler', 'Query/SQLStore/DVHandler/NumberHandler', 'Query/SQLStore/DVHandler/StringHandler', diff --git a/repo/includes/Query/SQLStore/DVHandler/IriHandler.php b/repo/includes/Query/SQLStore/DVHandler/IriHandler.php new file mode 100644 index 000..4dc25a5 --- /dev/null +++ b/repo/includes/Query/SQLStore/DVHandler/IriHandler.php @@ -0,0 +1,162 @@ +?php + +namespace Wikibase\Repo\Query\SQLStore\DVHandler; + +use Wikibase\Repo\Query\SQLStore\DataValueHandler; +use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; +use Wikibase\Repo\Database\FieldDefinition as FD; +use DataValues\DataValue; +use DataValues\IriValue; +use InvalidArgumentException; + +/** + * Represents the mapping between DataValues\IriValue and + * the corresponding table in the store. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since wd.qe + * + * @file + * @ingroup WikibaseSQLStore + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class IriHandler extends DataValueHandler { + + /** +* @see DataValueHandler::getTableDefinition +* +* @since wd.qe +* +* @return TableDefinition +*/ + public function getTableDefinition() { + $fields = array( + new FieldDefinition( 'scheme', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'fragment', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'query', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'hierp', FD::TYPE_TEXT, FD::NOT_NULL ), + + new FieldDefinition( 'iri', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'json', FD::TYPE_TEXT, FD::NOT_NULL ), + ); + + return new TableDefinition( 'iri', $fields ); + } + + /** +* @see DataValueHandler::getValueFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getValueFieldName() { + return 'json'; + } + + /** +* @see DataValueHandler::getSortFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getSortFieldName() { + return 'iri'; + } + + /** +* @see DataValueHandler::getLabelFieldName +* +* @since wd.qe +* +* @return string|null +*/ + public function getLabelFieldName() { + return 'iri'; + } + + /** +*
[MediaWiki-commits] [Gerrit] Added table for valueless snaks - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52370 Change subject: Added table for valueless snaks .. Added table for valueless snaks Change-Id: Icac0904b18bfc868a8633d388481c33ea0df752d --- M repo/includes/Query/SQLStore/Setup.php 1 file changed, 59 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/70/52370/1 diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 58d1a44..9be3f8c 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -141,27 +141,7 @@ $table = $table-mutateFields( array_merge( - array( - // Internal claim id - new FieldDefinition( - 'claim_id', - FieldDefinition::TYPE_INTEGER, - FieldDefinition::NOT_NULL, - FieldDefinition::NO_DEFAULT, - FieldDefinition::ATTRIB_UNSIGNED, - FieldDefinition::INDEX - ), - - // Internal property id - new FieldDefinition( - 'property_id', - FieldDefinition::TYPE_INTEGER, - FieldDefinition::NOT_NULL, - FieldDefinition::NO_DEFAULT, - FieldDefinition::ATTRIB_UNSIGNED, - FieldDefinition::INDEX - ), - ), + $this-getPropertySnakFields(), $table-getFields() ) ); @@ -171,6 +151,35 @@ } return $dvTables; + } + + /** +* TODO +* +* @return FieldDefinition[] +*/ + private function getPropertySnakFields() { + return array( + // Internal claim id + new FieldDefinition( + 'claim_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Internal property id + new FieldDefinition( + 'property_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ); } /** @@ -288,6 +297,35 @@ ) ); + // Table for snaks without a value + $tables[] = new TableDefinition( + 'valueless_snaks', + array_merge( + $this-getPropertySnakFields(), + array( + // Type of the snak + new FieldDefinition( + 'type', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Level at which the snak is used (ie main snak or
[MediaWiki-commits] [Gerrit] (Bug 45761) API module wbremoveclaims fail to use baserevid - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: (Bug 45761) API module wbremoveclaims fail to use baserevid .. (Bug 45761) API module wbremoveclaims fail to use baserevid Base revision id is not pulled in from the params during loading of the content, and due to this the diffs and later patches will be wrong. Change-Id: I77a378b006a6e780b956771d3e16ad6860d1ab49 --- M repo/includes/api/RemoveClaims.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/RemoveClaims.php b/repo/includes/api/RemoveClaims.php index 3f33420..cd96931 100644 --- a/repo/includes/api/RemoveClaims.php +++ b/repo/includes/api/RemoveClaims.php @@ -131,6 +131,7 @@ * @return EntityContent[] */ protected function getEntityContents( array $ids ) { + $params = $this-extractRequestParams(); $contents = array(); $baseRevisionId = isset( $params['baserevid'] ) ? intval( $params['baserevid'] ) : null; -- To view, visit https://gerrit.wikimedia.org/r/52346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77a378b006a6e780b956771d3e16ad6860d1ab49 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make whole facet row clickable on search - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52371 Change subject: Make whole facet row clickable on search .. Make whole facet row clickable on search Bug: 45554 Change-Id: Ib318f7046aa4ea4b84c45f4d0b86de52ffd7bd3e --- M resources/js/ext.translate.search.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/71/52371/1 diff --git a/resources/js/ext.translate.search.js b/resources/js/ext.translate.search.js index 9a40731..f954e4c 100644 --- a/resources/js/ext.translate.search.js +++ b/resources/js/ext.translate.search.js @@ -2,6 +2,11 @@ 'use strict'; $( document ).ready( function () { + // Make the whole rows clickable + $( '.facet-item' ).click( function () { + window.location = $( this ).find( 'a' ).attr( 'href' ); + } ); + $( '.tux-message' ).each( function () { var $this = $( this ); -- To view, visit https://gerrit.wikimedia.org/r/52371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib318f7046aa4ea4b84c45f4d0b86de52ffd7bd3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename js file to match naming convention - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52372 Change subject: Rename js file to match naming convention .. Rename js file to match naming convention Change-Id: Ia37ed3152f6e01976429acc3f57cac4be09c8853 --- M Translate.php R resources/js/ext.translate.special.searchtranslations.js 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/72/52372/1 diff --git a/Translate.php b/Translate.php index 15ecfd9..efe8327 100644 --- a/Translate.php +++ b/Translate.php @@ -452,7 +452,7 @@ ) + $resourcePaths; $wgResourceModules['ext.translate.special.searchtranslations'] = array( - 'scripts' = 'resources/js/ext.translate.search.js', + 'scripts' = 'resources/js/ext.translate.special.searchtranslations.js', 'styles' = 'resources/css/ext.translate.special.searchtranslations.css', 'dependencies' = array( 'ext.translate.editor' ), 'position' = 'top', diff --git a/resources/js/ext.translate.search.js b/resources/js/ext.translate.special.searchtranslations.js similarity index 100% rename from resources/js/ext.translate.search.js rename to resources/js/ext.translate.special.searchtranslations.js -- To view, visit https://gerrit.wikimedia.org/r/52372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia37ed3152f6e01976429acc3f57cac4be09c8853 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing reference specific handling from the listview widget - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/52373 Change subject: Removing reference specific handling from the listview widget .. Removing reference specific handling from the listview widget Since the listview widget shall be a more generic widget managing lists, the reference specific code is moved to where the actual listwidget for the references is initialized. Change-Id: Ic7ca3f75643e2a08d9d237d7f7c38b98cfc04176 --- M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 2 files changed, 83 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/73/52373/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index 24513e1..d58b4ff 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -46,8 +46,9 @@ *(2) {*|null} The value of the list item which will be removed. null for empty value. *(3) {jQuery} The list item's DOM node, removed. * - * @event canceled: Triggered after canceling the process of adding a new item. + * @event enternewitem: Triggered when initializing the process of adding a new item to the list. *(1) {jQuery.Event} + *(2) {jQuery} The DOM node pending to be added permanently to the list. */ $.widget( 'wikibase.listview', PARENT, { widgetBaseClass: 'wb-listview', @@ -246,83 +247,9 @@ * @since 0.4 */ enterNewItem: function() { - var self = this, - $newLi = this.addItem(); - + var $newLi = this.addItem(); this._lia.liInstance( $newLi ).startEditing(); - - // first time the claim (or at least a part of it) drops out of edit mode: - // TODO: not nice to use the event of the main snak, perhaps the claimview could offer one! - $newLi.on( this._lia.prefixedEvent( 'stopediting' ), function( event, dropValue ) { - var newSnak = self._lia.liInstance( $newLi ).$mainSnak.data( 'snakview' ).snak(); - - if ( self.__continueStopEditing ) { - self.__continueStopEditing = false; - $newLi.off( self._lia.prefixedEvent( 'remove' ) ); - return; - } - - if ( !dropValue ) { - event.preventDefault(); - } else { - self.element.removeClass( 'wb-error' ); - } - - if( !dropValue newSnak ) { - // temporary claim that is just used for saving; claimview will create its - // own claim object after saving has been successful - var reference = new wb.Reference( newSnak ); - - // TODO: add newly created claim to model of represented entity! - - var api = new wb.RepoApi(), - snaks = reference.getSnaks(), - statementGuid = self.option( 'statementGuid' ); - - api.setReference( - statementGuid, - snaks, - wb.getRevisionStore().getClaimRevision( statementGuid ) - ).done( function( newRefWithHash, pageInfo ) { - // update revision store: - wb.getRevisionStore().setClaimRevision( - pageInfo.lastrevid, statementGuid - ); - - // Continue stopEditing event by triggering it again skipping - // claimlistview's API call. - self.__continueStopEditing = true; - - self._lia.liInstance( $( event.target ) ).stopEditing( dropValue ); - - // Replace the new list item which was initially initialized as empty by - // destroying it and adding a new list item with the value provided by the API. - self.removeItem( $newLi ); - self.addItem( newRefWithHash ); // display new reference with final hash - } ) - .fail( function( errorCode,
[MediaWiki-commits] [Gerrit] Handle gracefully if solr is not running - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52374 Change subject: Handle gracefully if solr is not running .. Handle gracefully if solr is not running Change-Id: I3cc00721a21290514861e4a34f88c7873b8f189b --- M TranslateSearch.i18n.php M specials/SpecialSearchTranslations.php 2 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/74/52374/1 diff --git a/TranslateSearch.i18n.php b/TranslateSearch.i18n.php index a166f59..281c593 100644 --- a/TranslateSearch.i18n.php +++ b/TranslateSearch.i18n.php @@ -26,6 +26,9 @@ 'tux-sst-nosolr-title' = 'Search unavailable', 'tux-sst-nosolr-body' = 'This wiki does not have a translation search service.', + 'tux-sst-solr-offline-title' = 'Search unavailable', + 'tux-sst-solr-offline-body' = 'Search service is temporarily unavailable.', + ); /** Message documentation (Message documentation) @@ -54,6 +57,12 @@ 'tux-sst-nosolr-body' = 'Used as error message. The page title for this message is {{msg-mw|Tux-sst-nosolr-title}}.', + 'tux-sst-solr-offline-title' = 'Used as title of error page. + +The body of error message is {{msg-mw|Tux-sst-solr-offline-body}}.', + 'tux-sst-solr-offline-body' = 'Used as error message. + +The page title for this message is {{msg-mw|tux-sst-solr-offline-title}}.', ); /** Asturian (asturianu) diff --git a/specials/SpecialSearchTranslations.php b/specials/SpecialSearchTranslations.php index fbc9277..06fab93 100644 --- a/specials/SpecialSearchTranslations.php +++ b/specials/SpecialSearchTranslations.php @@ -71,7 +71,12 @@ return; } - $resultset = $this-doSearch( $server-getSolarium(), $queryString ); + try { + $resultset = $this-doSearch( $server-getSolarium(), $queryString ); + } catch ( Solarium_Client_HttpException $e ) { + error_log( 'Translate: Solr search server unavailable' ); + throw new ErrorPageError( 'tux-sst-solr-offline-title', 'tux-sst-solr-offline-body' ); + } // Part 1: facets $facets = ''; -- To view, visit https://gerrit.wikimedia.org/r/52374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cc00721a21290514861e4a34f88c7873b8f189b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - authorize/customize/normalize/personalize - change (mediawiki...Configure)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52375 Change subject: American spelling - authorize/customize/normalize/personalize .. American spelling - authorize/customize/normalize/personalize Change-Id: I8a86b0e84db1b7d171a331489ae3a966a0d630a6 --- M Configure.i18n.php M settings/Settings.i18n.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure refs/changes/75/52375/1 diff --git a/Configure.i18n.php b/Configure.i18n.php index 7d6f709..aac68e2 100644 --- a/Configure.i18n.php +++ b/Configure.i18n.php @@ -10,7 +10,7 @@ $messages['en'] = array( 'configure' = 'Configure the wiki', - 'configure-desc' = 'Allow authorised users to [[Special:Configure|configure]] the wiki via a web-based interface', + 'configure-desc' = 'Allow authorized users to [[Special:Configure|configure]] the wiki via a web-based interface', 'configure-desc-group'= 'Group', 'configure-desc-key' = 'Key', 'configure-desc-ns' = 'Namespace', @@ -30,7 +30,7 @@ 'configure-ext-use-extension' = 'Use this extension', 'configure-ext-use' = 'Use', 'configure-form-reason' = 'Reason:', - 'configure-customised'= ''This setting has been customised'', + 'configure-customised'= ''This setting has been customized'', 'configure-arrayinput-oneperline' = ''(one per line)'', 'configure-summary' = 'This special page allows you to configure this wiki, see [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings] for more information.', @@ -88,7 +88,7 @@ 'configure-section-html' = 'HTML', 'configure-section-debug' = 'Debugging', 'configure-section-profiling' = 'Profiling', - 'configure-section-site' = 'Site customisation', + 'configure-section-site' = 'Site customization', 'configure-section-ajax' = 'Ajax', 'configure-section-css-js'= 'CSS and JavaScript', 'configure-section-resourceloader'= 'ResourceLoader', diff --git a/settings/Settings.i18n.php b/settings/Settings.i18n.php index 1022977..1286442 100644 --- a/settings/Settings.i18n.php +++ b/settings/Settings.i18n.php @@ -89,7 +89,7 @@ 'configure-setting-wgParserTestRemote' = 'Specifies target CodeReview installation to send test result data when executing parserTests.php --upload', 'configure-setting-wgPreprocessorCacheThreshold' = 'Preprocessor caching threshold', 'configure-setting-wgRegisterInternalExternals' = 'Register external links pointing to same server', - 'configure-setting-wgRestrictDisplayTitle' = 'Require use of nowiki{{DISPLAYTITLE}}/nowiki to normalise to the same canonical page title', + 'configure-setting-wgRestrictDisplayTitle' = 'Require use of nowiki{{DISPLAYTITLE}}/nowiki to normalize to the same canonical page title', 'configure-setting-wgAmericanDates' = Require 'May 12' instead of '12 May' in English, 'configure-setting-wgDisableLangConversion' = 'Disable language variant conversion', 'configure-setting-wgDisableTitleConversion' = 'Disable language variant conversion for page titles', @@ -618,7 +618,7 @@ 'configure-setting-wgBlockDisablesLogin' = 'Disallow blocked users to login', 'configure-setting-wgSysopEmailBans' = 'Allow administrators to ban users from accessing [[Special:EmailUser]]', 'configure-setting-wgEnotifFromEditor' = 'Email notifications appear to be coming from the page editor (not from wiki server)', - 'configure-setting-wgEnotifImpersonal' = 'Send a generic email instead of a personalised email for each user', + 'configure-setting-wgEnotifImpersonal' = 'Send a generic email instead of a personalized email for each user', 'configure-setting-wgEnotifMaxRecips' = 'Maximum number of users to email at once when using impersonal email', 'configure-setting-wgEnotifMinorEdits' = 'Email notifications also for minor edits (user preference is shown and user needs to opt-in)', 'configure-setting-wgEnotifRevealEditorAddress' = Reply-to address of email notifications may be filled with page editor's address (user preference is shown and user needs to opt-in), -- To view, visit https://gerrit.wikimedia.org/r/52375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a86b0e84db1b7d171a331489ae3a966a0d630a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Configure Gerrit-Branch: master Gerrit-Owner:
[MediaWiki-commits] [Gerrit] American spelling - authorize/customize/normalize/personalize - change (mediawiki...Configure)
Siebrand has submitted this change and it was merged. Change subject: American spelling - authorize/customize/normalize/personalize .. American spelling - authorize/customize/normalize/personalize Change-Id: I8a86b0e84db1b7d171a331489ae3a966a0d630a6 --- M Configure.i18n.php M settings/Settings.i18n.php 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/Configure.i18n.php b/Configure.i18n.php index 7d6f709..aac68e2 100644 --- a/Configure.i18n.php +++ b/Configure.i18n.php @@ -10,7 +10,7 @@ $messages['en'] = array( 'configure' = 'Configure the wiki', - 'configure-desc' = 'Allow authorised users to [[Special:Configure|configure]] the wiki via a web-based interface', + 'configure-desc' = 'Allow authorized users to [[Special:Configure|configure]] the wiki via a web-based interface', 'configure-desc-group'= 'Group', 'configure-desc-key' = 'Key', 'configure-desc-ns' = 'Namespace', @@ -30,7 +30,7 @@ 'configure-ext-use-extension' = 'Use this extension', 'configure-ext-use' = 'Use', 'configure-form-reason' = 'Reason:', - 'configure-customised'= ''This setting has been customised'', + 'configure-customised'= ''This setting has been customized'', 'configure-arrayinput-oneperline' = ''(one per line)'', 'configure-summary' = 'This special page allows you to configure this wiki, see [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings] for more information.', @@ -88,7 +88,7 @@ 'configure-section-html' = 'HTML', 'configure-section-debug' = 'Debugging', 'configure-section-profiling' = 'Profiling', - 'configure-section-site' = 'Site customisation', + 'configure-section-site' = 'Site customization', 'configure-section-ajax' = 'Ajax', 'configure-section-css-js'= 'CSS and JavaScript', 'configure-section-resourceloader'= 'ResourceLoader', diff --git a/settings/Settings.i18n.php b/settings/Settings.i18n.php index 1022977..1286442 100644 --- a/settings/Settings.i18n.php +++ b/settings/Settings.i18n.php @@ -89,7 +89,7 @@ 'configure-setting-wgParserTestRemote' = 'Specifies target CodeReview installation to send test result data when executing parserTests.php --upload', 'configure-setting-wgPreprocessorCacheThreshold' = 'Preprocessor caching threshold', 'configure-setting-wgRegisterInternalExternals' = 'Register external links pointing to same server', - 'configure-setting-wgRestrictDisplayTitle' = 'Require use of nowiki{{DISPLAYTITLE}}/nowiki to normalise to the same canonical page title', + 'configure-setting-wgRestrictDisplayTitle' = 'Require use of nowiki{{DISPLAYTITLE}}/nowiki to normalize to the same canonical page title', 'configure-setting-wgAmericanDates' = Require 'May 12' instead of '12 May' in English, 'configure-setting-wgDisableLangConversion' = 'Disable language variant conversion', 'configure-setting-wgDisableTitleConversion' = 'Disable language variant conversion for page titles', @@ -618,7 +618,7 @@ 'configure-setting-wgBlockDisablesLogin' = 'Disallow blocked users to login', 'configure-setting-wgSysopEmailBans' = 'Allow administrators to ban users from accessing [[Special:EmailUser]]', 'configure-setting-wgEnotifFromEditor' = 'Email notifications appear to be coming from the page editor (not from wiki server)', - 'configure-setting-wgEnotifImpersonal' = 'Send a generic email instead of a personalised email for each user', + 'configure-setting-wgEnotifImpersonal' = 'Send a generic email instead of a personalized email for each user', 'configure-setting-wgEnotifMaxRecips' = 'Maximum number of users to email at once when using impersonal email', 'configure-setting-wgEnotifMinorEdits' = 'Email notifications also for minor edits (user preference is shown and user needs to opt-in)', 'configure-setting-wgEnotifRevealEditorAddress' = Reply-to address of email notifications may be filled with page editor's address (user preference is shown and user needs to opt-in), -- To view, visit https://gerrit.wikimedia.org/r/52375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a86b0e84db1b7d171a331489ae3a966a0d630a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Configure Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
[MediaWiki-commits] [Gerrit] Fix whitelist/blacklist checking on export - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52377 Change subject: Fix whitelist/blacklist checking on export .. Fix whitelist/blacklist checking on export The list of supported languages is an array, not a list. Bug: 45693 Change-Id: Id52cc01c36cee71c2d8ce300b2287b7f8ce6e75c --- M scripts/export.php 1 file changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/77/52377/1 diff --git a/scripts/export.php b/scripts/export.php index 084acca..31b8ccd 100644 --- a/scripts/export.php +++ b/scripts/export.php @@ -233,19 +233,17 @@ $definitionFile = str_replace( $wgTranslateGroupRoot, $options['ppgettext'], $path ); } - $translatebleLanguages = $group-getTranslatableLanguages(); + $whitelist = $group-getTranslatableLanguages(); foreach ( $langs as $lang ) { if ( !$group-isValidLanguage( $lang ) ) { continue; } - // Do not export languges that are blacklisted (or not whitelisted). As - // $translatebleLanguages can be null, only test if $translatebleLanguages - // is an array. - if ( is_array( $translatebleLanguages ) - !in_array( $lang, $translatebleLanguages ) - ) { + // Do not export languges that are blacklisted (or not whitelisted). + // Also check that whitelist is not null, which means that all + // languages are allowed for translation and export. + if ( is_array( $whitelist ) !isset( $whitelist[$lang] ) ) { continue; } -- To view, visit https://gerrit.wikimedia.org/r/52377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id52cc01c36cee71c2d8ce300b2287b7f8ce6e75c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjusted layout for side-by-side views - change (mediawiki...Translate)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/52378 Change subject: Adjusted layout for side-by-side views .. Adjusted layout for side-by-side views Several changes to better fit short messages when displayed in a side-by-side view such as page or proofread: * Margins are used when width is more than 900px * Style adjusted to make the list of messages look more like a document. * Fixes in the buttons to switch views to make them look connected. * By using a tux-view-switcher class, CSS rules for addign icons on toggle buttons are smplified. Change-Id: I39a36df9d76b10dad5c511be391d20345e84b663 --- M resources/css/ext.translate.messagetable.css M resources/css/ext.translate.proofread.css M utils/TuxMessageTable.php 3 files changed, 42 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/78/52378/1 diff --git a/resources/css/ext.translate.messagetable.css b/resources/css/ext.translate.messagetable.css index 032499c..0ac40dd 100644 --- a/resources/css/ext.translate.messagetable.css +++ b/resources/css/ext.translate.messagetable.css @@ -54,7 +54,7 @@ /* Default colors */ .tux-messagelist { color: #252525; - background-color: #FF; + background-color: #F8F8F8; max-width: 800px; } @@ -71,6 +71,7 @@ margin-left: 5px !important; vertical-align: middle; border-bottom: 1px solid #C9C9C9; + background: #FF; } .tux-message-item.translated, @@ -209,24 +210,33 @@ text-shadow: none; } -.toggle.button:first-child { - border-radius: 3px 0 0 3px; -} - -.toggle.button:last-child { - border-radius: 0 3px 3px 0; +.tux-action-bar .tux-view-switcher { + padding: 0 5px; } .tux-action-bar .tux-view-switcher .toggle.button { - width: 50%; + width: 33%; } -.tux-action-bar .translate-mode-button:before { +.tux-action-bar .tux-view-switcher .toggle.button:first-child { + border-radius: 3px 0 0 3px; + border-right: none; +} + +.tux-action-bar .tux-view-switcher .toggle.button:last-child { + border-radius: 0 3px 3px 0; + border-left: none; +} + +.tux-action-bar .tux-view-switcher .toggle.button:before { content: ; height: 15px; width: 25px; display: inline-block; vertical-align: bottom; +} + +.tux-action-bar .translate-mode-button:before { background: transparent url(../images/view-list.png) center center no-repeat; background-image: -webkit-linear-gradient(transparent, transparent), url(../images/view-list.svg); background-image: -moz-linear-gradient(transparent, transparent), url(../images/view-list.svg); @@ -241,11 +251,6 @@ } .tux-action-bar .page-mode-button:before { - content: ; - height: 15px; - width: 25px; - display: inline-block; - vertical-align: bottom; background: transparent url(../images/view-page.png) center center no-repeat; background-image: -webkit-linear-gradient(transparent, transparent), url(../images/view-page.svg); background-image: -moz-linear-gradient(transparent, transparent), url(../images/view-page.svg); @@ -260,11 +265,6 @@ } .tux-action-bar .tux-proofread-button:before { - content: ; - height: 15px; - width: 25px; - display: inline-block; - vertical-align: bottom; background: transparent url(../images/view-proofread.png) center center no-repeat; background-image: -webkit-linear-gradient(transparent, transparent), url(../images/view-proofread.svg); background-image: -moz-linear-gradient(transparent, transparent), url(../images/view-proofread.svg); diff --git a/resources/css/ext.translate.proofread.css b/resources/css/ext.translate.proofread.css index a304469..b016756 100644 --- a/resources/css/ext.translate.proofread.css +++ b/resources/css/ext.translate.proofread.css @@ -1,16 +1,30 @@ .ext-translate-container .tux-messagelist .tux-message-proofread { height: auto; min-height: 50px; - padding: 20px 0 20px 0; - margin: 0; + padding: 40px 0px; + margin: 0 auto; vertical-align: middle; - border-bottom: 1px solid #f8f8f8; - border-left: 1px solid #f0f0f0; - border-right: 1px solid #f0f0f0; + border-bottom: 1px solid #f0f0f0; + border-left: 1px solid #DD; + border-right: 1px solid #DD; + max-width: 900px; + background: #FF; } -.tux-message-proofread:hover { - background: #fefefe; +.ext-translate-container .tux-messagelist .tux-message-proofread:hover { + background: #FCFCFC; +} + +.ext-translate-container .tux-messagelist .tux-message-proofread:first-child { + margin-top: 10px; + padding-top: 60px; + border-top: 1px solid #DD; +} + +.ext-translate-container
[MediaWiki-commits] [Gerrit] Figured out layout of the QueryStore interface - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Figured out layout of the QueryStore interface .. Figured out layout of the QueryStore interface Change-Id: I97f4c4bfeac1f26e62a8d4cba3f7224179564342 --- M repo/config/Wikibase.experimental.php M repo/includes/Query/QueryStore.php C repo/includes/Query/QueryStoreUpdater.php M repo/includes/Query/SQLStore/Engine.php M repo/includes/Query/SQLStore/Setup.php M repo/includes/Query/SQLStore/Store.php A repo/includes/Query/SQLStore/StoreConfig.php R repo/includes/Query/SQLStore/Updater.php C repo/tests/phpunit/includes/Query/QueryStoreUpdaterTest.php M repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php M repo/tests/phpunit/includes/Query/SQLStore/SetupTest.php A repo/tests/phpunit/includes/Query/SQLStore/StoreConfigTest.php M repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php A repo/tests/phpunit/includes/Query/SQLStore/UpdaterTest.php 14 files changed, 488 insertions(+), 86 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/config/Wikibase.experimental.php b/repo/config/Wikibase.experimental.php index 32dc947..ea3015b 100644 --- a/repo/config/Wikibase.experimental.php +++ b/repo/config/Wikibase.experimental.php @@ -61,6 +61,7 @@ 'Wikibase\Repo\Query\QueryEngineResult', 'Wikibase\Repo\Query\QueryResult', 'Wikibase\Repo\Query\QueryStore', + 'Wikibase\Repo\Query\QueryStoreUpdater', 'Wikibase\Repo\Query\SQLStore\DVHandler\BooleanHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\EntityIdHandler', @@ -72,7 +73,8 @@ 'Wikibase\Repo\Query\SQLStore\Engine', 'Wikibase\Repo\Query\SQLStore\Setup', 'Wikibase\Repo\Query\SQLStore\Store', - 'Wikibase\Repo\Query\SQLStore\Writer', + 'Wikibase\Repo\Query\SQLStore\StoreConfig', + 'Wikibase\Repo\Query\SQLStore\Updater', ); foreach ( $classes as $class ) { @@ -97,6 +99,9 @@ $wgAutoloadClasses['Wikibase\Repo\Test\Query\QueryStoreTest'] = $dir . 'tests/phpunit/includes/Query/QueryStoreTest.php'; + + $wgAutoloadClasses['Wikibase\Repo\Test\Query\QueryStoreUpdaterTest'] + = $dir . 'tests/phpunit/includes/Query/QueryStoreUpdaterTest.php'; $wgAutoloadClasses['Wikibase\Repo\Test\Database\MWDB\ExtendedAbstractionTest'] = $dir . 'tests/phpunit/includes/Database/MWDB/ExtendedAbstractionTest.php'; @@ -153,6 +158,8 @@ 'Query/SQLStore/Engine', 'Query/SQLStore/Setup', 'Query/SQLStore/Store', + 'Query/SQLStore/StoreConfig', + 'Query/SQLStore/Updater', 'specials/SpecialEntityData', diff --git a/repo/includes/Query/QueryStore.php b/repo/includes/Query/QueryStore.php index 7bfe7df..bc3342c 100644 --- a/repo/includes/Query/QueryStore.php +++ b/repo/includes/Query/QueryStore.php @@ -2,13 +2,14 @@ namespace Wikibase\Repo\Query; +use MessageReporter; + /** - * Interface for objects that can act as query store. + * Interface for query stores providing access to all needed sub components + * such as updaters, query engines and setup/teardown operations. * - * A query store is a storage interface that indexes information in such - * a way that a query engine can compute query results against it. - * - * TODO: clearly define responsibilities + * This interface somewhat acts as facade to the query component. + * All access to a specific store should typically happen via this interface. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,13 +36,62 @@ */ interface QueryStore { - // TODO + // TODO: create store factory and figure out how to inject dependencies + // for the typical Wikibase repo use case. /** +* Returns the name of the query store. This name can be configuration dependent +* and is thus not always the same for a certain store type. For instance, you can +* have Wikibase SQL store and Wikibase SQL store for update to new config. +* * @since 0.4 * * @return string */ public function getName(); -} \ No newline at end of file + /** +* Returns the query engine for this store. +* The query engine allows running queries against the store. +* +* @since wd.qe +* +* @return QueryEngine +*/ + public function getQueryEngine(); + + /** +* Returns the updater for this store. +* The updater allows for updating the data in the store. +* +* @since wd.qe +* +* @return QueryStoreUpdater +*/ + public function getUpdater(); + + /** +* Sets up the store. +* This means
[MediaWiki-commits] [Gerrit] Don't create empty files in AndroidXmlFFS - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52379 Change subject: Don't create empty files in AndroidXmlFFS .. Don't create empty files in AndroidXmlFFS Change-Id: I04d55daa07caf7bafe7bc5447406e3671e850e28 --- M ffs/AndroidXmlFFS.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/79/52379/1 diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php index 0948228..863a9ce 100644 --- a/ffs/AndroidXmlFFS.php +++ b/ffs/AndroidXmlFFS.php @@ -39,6 +39,11 @@ $writer = new SimpleXMLElement( $template ); $mangler = $this-group-getMangler(); + $collection-filter( 'hastranslation', false ); + if ( count( $collection ) === 0 ) { + return ''; + } + /** * @var $m TMessage */ @@ -46,9 +51,6 @@ $key = $mangler-unmangle( $key ); $value = $m-translation(); - if ( $value === null ) { - continue; - } // Kudos to the brilliant person who invented this braindead file format $string = $writer-addChild( 'string', addcslashes( $value, '\'' ) ); -- To view, visit https://gerrit.wikimedia.org/r/52379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04d55daa07caf7bafe7bc5447406e3671e850e28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add fuzzy support to AndroidXmlFFS - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52380 Change subject: Add fuzzy support to AndroidXmlFFS .. Add fuzzy support to AndroidXmlFFS Change-Id: Ib841b315ec54a4a3f840ded6fe9c2b97ba0f18fc --- M ffs/AndroidXmlFFS.php M tests/ffs/AndroidXmlFFSTest.php 2 files changed, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/80/52380/1 diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php index 863a9ce..15fac78 100644 --- a/ffs/AndroidXmlFFS.php +++ b/ffs/AndroidXmlFFS.php @@ -21,7 +21,13 @@ foreach ( $reader-string as $string ) { $key = (string)$string['name']; - $messages[$key] = stripcslashes( (string)$string ); + $value = stripcslashes( (string)$string ); + + if ( isset( $string['fuzzy'] ) (string)$string['fuzzy'] === 'true' ) { + $value = TRANSLATE_FUZZY . $value; + } + + $messages[$key] = $value; } return array( @@ -51,6 +57,7 @@ $key = $mangler-unmangle( $key ); $value = $m-translation(); + $value = str_replace( TRANSLATE_FUZZY, '', $value ); // Kudos to the brilliant person who invented this braindead file format $string = $writer-addChild( 'string', addcslashes( $value, '\'' ) ); @@ -65,4 +72,8 @@ return $writer-asXml(); } + + public function supportsFuzzy() { + return 'yes'; + } } diff --git a/tests/ffs/AndroidXmlFFSTest.php b/tests/ffs/AndroidXmlFFSTest.php index a9aa3ad..8e2d623 100644 --- a/tests/ffs/AndroidXmlFFSTest.php +++ b/tests/ffs/AndroidXmlFFSTest.php @@ -30,7 +30,7 @@ ?xml version=1.0 encoding=utf-8? resources string name=wpt_voicerecVoice recording/string - string name=wpt_stillimagePicture/string + string name=wpt_stillimage fuzzy=truePicture/string /resources XML; @@ -42,7 +42,7 @@ $parsed = $ffs-readFromVariable( $file ); $expected = array( 'wpt_voicerec' = 'Voice recording', - 'wpt_stillimage' = 'Picture', + 'wpt_stillimage' = '!!FUZZY!!Picture', ); $expected = array( 'MESSAGES' = $expected, 'AUTHORS' = array() ); $this-assertEquals( $expected, $parsed ); @@ -57,7 +57,7 @@ $messages = array( 'ko=26ra' = 'wawe', - 'foobar' = 'Kissa kala koira a\'b', + 'foobar' = '!!FUZZY!!Kissa kala koira a\'b', ); $collection = new MockMessageCollection( $messages ); @@ -81,4 +81,6 @@ $this-messages['foobar']-addTag( 'fuzzy' ); } + + public function filter() {} } -- To view, visit https://gerrit.wikimedia.org/r/52380 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib841b315ec54a4a3f840ded6fe9c2b97ba0f18fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45769) make string datatype non-experimental - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/52382 Change subject: (bug 45769) make string datatype non-experimental .. (bug 45769) make string datatype non-experimental Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 --- M lib/config/WikibaseLib.default.php M lib/config/WikibaseLib.experimental.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/82/52382/1 diff --git a/lib/config/WikibaseLib.default.php b/lib/config/WikibaseLib.default.php index aeb4d48..c3a8bfd 100644 --- a/lib/config/WikibaseLib.default.php +++ b/lib/config/WikibaseLib.default.php @@ -93,4 +93,5 @@ $wgWBSettings['dataTypes'] = array( 'wikibase-item', 'commonsMedia', + 'string', ); diff --git a/lib/config/WikibaseLib.experimental.php b/lib/config/WikibaseLib.experimental.php index 0bb6ed7..3ea4f7e 100644 --- a/lib/config/WikibaseLib.experimental.php +++ b/lib/config/WikibaseLib.experimental.php @@ -41,7 +41,6 @@ 'monolingual-text', 'multilingual-text', 'time', - 'string', ) ); $wgAutoloadClasses['Wikibase\Query'] = __DIR__ . '/../includes/query/Query.php'; -- To view, visit https://gerrit.wikimedia.org/r/52382 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused isValidLanguage code - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52384 Change subject: Remove unused isValidLanguage code .. Remove unused isValidLanguage code Change-Id: I602009d17643e950b825898b9e6e572ea28294a4 --- M messagegroups/FileBasedMessageGroup.php M scripts/export.php 2 files changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/84/52384/1 diff --git a/messagegroups/FileBasedMessageGroup.php b/messagegroups/FileBasedMessageGroup.php index 158213f..ff81c29 100644 --- a/messagegroups/FileBasedMessageGroup.php +++ b/messagegroups/FileBasedMessageGroup.php @@ -119,13 +119,4 @@ return $code; } } - - /** -* Checks whether a language code can be used in this group. -* @param $code \string -* @return \bool -*/ - public function isValidLanguage( $code ) { - return $this-mapCode( $code ) !== 'x-invalidLanguageCode'; - } } diff --git a/scripts/export.php b/scripts/export.php index 084acca..743b664 100644 --- a/scripts/export.php +++ b/scripts/export.php @@ -236,10 +236,6 @@ $translatebleLanguages = $group-getTranslatableLanguages(); foreach ( $langs as $lang ) { - if ( !$group-isValidLanguage( $lang ) ) { - continue; - } - // Do not export languges that are blacklisted (or not whitelisted). As // $translatebleLanguages can be null, only test if $translatebleLanguages // is an array. -- To view, visit https://gerrit.wikimedia.org/r/52384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I602009d17643e950b825898b9e6e572ea28294a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - summarize - change (mediawiki...Contributors)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52385 Change subject: American spelling - summarize .. American spelling - summarize Change-Id: I6c3e6b39a845115576ce6d2ec449acd089b26376 --- M Contributors.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors refs/changes/85/52385/1 diff --git a/Contributors.i18n.php b/Contributors.i18n.php index 75b9ac2..b17c934 100644 --- a/Contributors.i18n.php +++ b/Contributors.i18n.php @@ -14,7 +14,7 @@ */ $messages['en'] = array( 'contributors' = 'Contributors', - 'contributors-desc'= 'Summarises the main contributors to a page', + 'contributors-desc'= 'Summarizes the main contributors to a page', 'contributors-toolbox' = 'Main contributors', 'contributors-legend' = 'List main contributors to a page', 'contributors-target' = 'Title:', -- To view, visit https://gerrit.wikimedia.org/r/52385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c3e6b39a845115576ce6d2ec449acd089b26376 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Contributors Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjustments for empty list message - change (mediawiki...Translate)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/52386 Change subject: Adjustments for empty list message .. Adjustments for empty list message Size and layout adjustments for the message that is displayed for empty message lists. Change-Id: I06ab33eb1f9ddded0ac8d6b672042751969376dd --- M resources/css/ext.translate.messagetable.css 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/86/52386/1 diff --git a/resources/css/ext.translate.messagetable.css b/resources/css/ext.translate.messagetable.css index 032499c..e8c998b 100644 --- a/resources/css/ext.translate.messagetable.css +++ b/resources/css/ext.translate.messagetable.css @@ -345,23 +345,27 @@ vertical-align: middle; } -.tux-empty-list div { - margin: 5px; +.tux-empty-list { + padding: 20px; } .tux-empty-list-header { font-size: 25px; + padding: 5px 0; } .tux-empty-list-guide { - font-size: 14px; + font-size: 15px; color: #565656; + padding: 5px 0; } .tux-empty-list-actions { font-size: 15px; + padding: 8px 0; } .tux-empty-list-actions a { cursor: pointer; + margin: 0 10px } -- To view, visit https://gerrit.wikimedia.org/r/52386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06ab33eb1f9ddded0ac8d6b672042751969376dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing toolbar definition from listview widget - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Removing toolbar definition from listview widget .. Removing toolbar definition from listview widget The toolbar definition in the listview widget actually belongs to the list of references initialized in the statementview widget. The listview widget shall not be aware of editing interaction. Change-Id: I4d4e363f659af62042ab6dcaeaccbb14f3656737 --- M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js M lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js M repo/resources/wikibase.ui.entityViewInit.js 4 files changed, 35 insertions(+), 24 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index 6e1cce4..24513e1 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -327,17 +327,4 @@ } ); -// Register toolbar: -$.wikibase.toolbarcontroller.definition( 'addtoolbar', { - widget: { - name: 'wikibase.listview', - prototype: $.wikibase.listview.prototype - }, - options: { - interactionWidgetName: $.wikibase.listview.prototype.widgetName, - toolbarParentSelector: '.wb-listview-toolbar', - addButtonLabel: mw.msg( 'wikibase-addreference' ) - } -} ); - }( mediaWiki, wikibase, jQuery ) ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index 30db435..4424a4b 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -164,7 +164,7 @@ } } ); -// Register toolbar: +// Register toolbars: $.wikibase.toolbarcontroller.definition( 'edittoolbar', { widget: { name: 'wikibase.statementview', @@ -176,4 +176,20 @@ } } ); +$.wikibase.toolbarcontroller.definition( 'addtoolbar', { + id: 'references', + selector: '.wb-statement-references-container', + eventPrefix: 'referenceview', + baseClass: 'wb-referenceview', + options: { + toolbarParentSelector: '.wb-statement-references .wb-listview-toolbar', + customAction: function( event, $parent ) { + var statementView = $parent.closest( '.wb-statementview' ).data( 'statementview' ); + statementView.$references.data( 'listview' ).enterNewItem(); + }, + eventPrefix: $.wikibase.statementview.prototype.widgetEventPrefix, + addButtonLabel: mw.msg( 'wikibase-addreference' ) + } +} ); + }( mediaWiki, wikibase, jQuery ) ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js b/lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js index 4eefe60..1799464 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js @@ -54,16 +54,23 @@ /** * Initializes the toolbars for the nodes that are descendants of the node the toolbar * controller is initialized on. +* * @since 0.4 +* @param {boolean} [isPending] Whether element that triggered the toolbar +*(re-)initialization is in a pending state. */ - initToolbars: function() { + initToolbars: function( isPending ) { var self = this; $.each( TOOLBAR_TYPES, function( i, type ) { $.each( self.options[type], function( j, id ) { - var def = $.wikibase.toolbarcontroller.definition( type, id ); + var def = $.wikibase.toolbarcontroller.definition( type, id ), + options = ( type === 'edittoolbar' isPending ) ? + $.extend( {}, def.options, { enableRemove: !isPending } ) + : def.options; + self.element - .find( def.selector || ':' + def.widget.fullName )[type]( def.options ); + .find( def.selector || ':' + def.widget.fullName )[type]( options ); } );
[MediaWiki-commits] [Gerrit] Return correct value for getName in the SQL Store - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Return correct value for getName in the SQL Store .. Return correct value for getName in the SQL Store Change-Id: Id04c723c1db73dfd1a9c58bf59f247ded566e3e7 --- M repo/includes/Query/SQLStore/Store.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/Query/SQLStore/Store.php b/repo/includes/Query/SQLStore/Store.php index af6fbaa..cec286c 100644 --- a/repo/includes/Query/SQLStore/Store.php +++ b/repo/includes/Query/SQLStore/Store.php @@ -88,7 +88,7 @@ * @return string */ public function getName() { - return 'Wikibase SQL store'; + return $this-config-getStoreName(); } /** -- To view, visit https://gerrit.wikimedia.org/r/52363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id04c723c1db73dfd1a9c58bf59f247ded566e3e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added preliminary definition of two non DV tables of the SQL... - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added preliminary definition of two non DV tables of the SQL Store .. Added preliminary definition of two non DV tables of the SQL Store Change-Id: I18153d98625a42a32a1c64a9a4c8a4ac1734d4c5 --- M repo/includes/Database/FieldDefinition.php M repo/includes/Query/SQLStore/Setup.php 2 files changed, 132 insertions(+), 1 deletion(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/Database/FieldDefinition.php b/repo/includes/Database/FieldDefinition.php index d280e5c..2462155 100644 --- a/repo/includes/Database/FieldDefinition.php +++ b/repo/includes/Database/FieldDefinition.php @@ -86,8 +86,23 @@ const TYPE_INTEGER = 'int'; const TYPE_FLOAT = 'float'; + const NOT_NULL = false; + const NULL = true; + + const NO_DEFAULT = null; + + const NO_ATTRIB = null; const ATTRIB_BINARY = 'binary'; const ATTRIB_UNSIGNED = 'unsigned'; + + const NO_INDEX = null; + const INDEX = 'index'; + const INDEX_UNIQUE = 'unique'; + const INDEX_FULLTEXT = 'fulltext'; + const INDEX_PRIMARY = 'primary'; + + const AUTOINCREMENT = true; + const NO_AUTOINCREMENT = false; /** @@ -101,7 +116,7 @@ * * @throws InvalidArgumentException */ - public function __construct( $name, $type, $null = true, $default = null, $attributes = null, $index = null, $autoIncrement = false ) { + public function __construct( $name, $type, $null = self::NULL, $default = self::NO_DEFAULT, $attributes = null, $index = null, $autoIncrement = false ) { if ( !is_string( $name ) ) { throw new InvalidArgumentException( 'The field $name needs to be a string' ); } diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 3a2a670..0d82f63 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -5,6 +5,7 @@ use Wikibase\Repo\Database\TableBuilder; use Wikibase\Repo\Database\QueryInterface; use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; use MessageReporter; /** @@ -131,6 +132,121 @@ } /** +* TODO +* +* @return TableDefinition[] +*/ + private function getNonDVTables() { + $tables = array(); + + // Id map with Wikibase EntityId to internal SQL store id + $tables[] = new TableDefinition( + 'entities', + array( + // Internal id + new FieldDefinition( + 'id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX_PRIMARY, + FieldDefinition::AUTOINCREMENT + ), + + // EntityId type part + new FieldDefinition( + 'type', + FieldDefinition::TYPE_TEXT, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::NO_ATTRIB, + FieldDefinition::INDEX + ), + + // EntityId numerical part + new FieldDefinition( + 'number', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ) + ); + + // Claim id table + $tables[] = new TableDefinition( + 'claims', + array( + // Internal id + new FieldDefinition( + 'id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, +
[MediaWiki-commits] [Gerrit] Removing reference specific handling from the listview widget - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Removing reference specific handling from the listview widget .. Removing reference specific handling from the listview widget Since the listview widget shall be a more generic widget managing lists, the reference specific code is moved to where the actual listwidget for the references is initialized. Change-Id: Ic7ca3f75643e2a08d9d237d7f7c38b98cfc04176 --- M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 2 files changed, 83 insertions(+), 78 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index 24513e1..d58b4ff 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -46,8 +46,9 @@ *(2) {*|null} The value of the list item which will be removed. null for empty value. *(3) {jQuery} The list item's DOM node, removed. * - * @event canceled: Triggered after canceling the process of adding a new item. + * @event enternewitem: Triggered when initializing the process of adding a new item to the list. *(1) {jQuery.Event} + *(2) {jQuery} The DOM node pending to be added permanently to the list. */ $.widget( 'wikibase.listview', PARENT, { widgetBaseClass: 'wb-listview', @@ -246,83 +247,9 @@ * @since 0.4 */ enterNewItem: function() { - var self = this, - $newLi = this.addItem(); - + var $newLi = this.addItem(); this._lia.liInstance( $newLi ).startEditing(); - - // first time the claim (or at least a part of it) drops out of edit mode: - // TODO: not nice to use the event of the main snak, perhaps the claimview could offer one! - $newLi.on( this._lia.prefixedEvent( 'stopediting' ), function( event, dropValue ) { - var newSnak = self._lia.liInstance( $newLi ).$mainSnak.data( 'snakview' ).snak(); - - if ( self.__continueStopEditing ) { - self.__continueStopEditing = false; - $newLi.off( self._lia.prefixedEvent( 'remove' ) ); - return; - } - - if ( !dropValue ) { - event.preventDefault(); - } else { - self.element.removeClass( 'wb-error' ); - } - - if( !dropValue newSnak ) { - // temporary claim that is just used for saving; claimview will create its - // own claim object after saving has been successful - var reference = new wb.Reference( newSnak ); - - // TODO: add newly created claim to model of represented entity! - - var api = new wb.RepoApi(), - snaks = reference.getSnaks(), - statementGuid = self.option( 'statementGuid' ); - - api.setReference( - statementGuid, - snaks, - wb.getRevisionStore().getClaimRevision( statementGuid ) - ).done( function( newRefWithHash, pageInfo ) { - // update revision store: - wb.getRevisionStore().setClaimRevision( - pageInfo.lastrevid, statementGuid - ); - - // Continue stopEditing event by triggering it again skipping - // claimlistview's API call. - self.__continueStopEditing = true; - - self._lia.liInstance( $( event.target ) ).stopEditing( dropValue ); - - // Replace the new list item which was initially initialized as empty by - // destroying it and adding a new list item with the value provided by the API. - self.removeItem( $newLi ); - self.addItem( newRefWithHash ); // display new reference with final hash - } ) - .fail( function( errorCode, details ) { -
[MediaWiki-commits] [Gerrit] Remove unused isValidLanguage code - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused isValidLanguage code .. Remove unused isValidLanguage code Change-Id: I602009d17643e950b825898b9e6e572ea28294a4 --- M messagegroups/FileBasedMessageGroup.php M scripts/export.php 2 files changed, 0 insertions(+), 13 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/messagegroups/FileBasedMessageGroup.php b/messagegroups/FileBasedMessageGroup.php index 158213f..ff81c29 100644 --- a/messagegroups/FileBasedMessageGroup.php +++ b/messagegroups/FileBasedMessageGroup.php @@ -119,13 +119,4 @@ return $code; } } - - /** -* Checks whether a language code can be used in this group. -* @param $code \string -* @return \bool -*/ - public function isValidLanguage( $code ) { - return $this-mapCode( $code ) !== 'x-invalidLanguageCode'; - } } diff --git a/scripts/export.php b/scripts/export.php index 084acca..743b664 100644 --- a/scripts/export.php +++ b/scripts/export.php @@ -236,10 +236,6 @@ $translatebleLanguages = $group-getTranslatableLanguages(); foreach ( $langs as $lang ) { - if ( !$group-isValidLanguage( $lang ) ) { - continue; - } - // Do not export languges that are blacklisted (or not whitelisted). As // $translatebleLanguages can be null, only test if $translatebleLanguages // is an array. -- To view, visit https://gerrit.wikimedia.org/r/52384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I602009d17643e950b825898b9e6e572ea28294a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added docs to FieldDefinition - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added docs to FieldDefinition .. Added docs to FieldDefinition Change-Id: I994141647b3c6a84d0dbf8faafc9e8837f097a51 --- M repo/includes/Database/FieldDefinition.php 1 file changed, 58 insertions(+), 1 deletion(-) Approvals: John Erling Blad: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/Database/FieldDefinition.php b/repo/includes/Database/FieldDefinition.php index 2462155..c8d46e6 100644 --- a/repo/includes/Database/FieldDefinition.php +++ b/repo/includes/Database/FieldDefinition.php @@ -106,6 +106,10 @@ /** +* Constructor. +* +* @since wd.db +* * @param string $name * @param string $type * @param boolean $null @@ -146,32 +150,85 @@ $this-autoIncrement = $autoIncrement; } + /** +* Returns the name of the field. +* +* @since wd.db +* +* @return string +*/ public function getName() { return $this-name; } + /** +* Returns the type of the field. +* This is one of the TYPE_ constants. +* +* @since wd.db +* +* @return string +*/ public function getType() { return $this-type; } + /** +* Returns the default value of the field. +* Null for no default value. +* +* @since wd.db +* +* @return mixed +*/ public function getDefault() { return $this-default; } + /** +* Returns the attributes of the field. +* This is one of the ATTRIB_ constants or null. +* +* @since wd.db +* +* @return string|null +*/ public function getAttributes() { return $this-attributes; } + /** +* Returns if the field allows for the value to be null. +* +* @since wd.db +* +* @return boolean +*/ public function allowsNull() { return $this-null; } + /** +* Returns the index type of the field. +* This is one of the INDEX_ constants or null. +* +* @since wd.db +* +* @return string|null +*/ public function getIndex() { return $this-index; } + /** +* Returns if the field has auto increment. +* +* @since wd.db +* +* @return boolean +*/ public function hasAutoIncrement() { return $this-autoIncrement; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/52365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I994141647b3c6a84d0dbf8faafc9e8837f097a51 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Americal spelling - authorize/initialize/normalize/recognize... - change (mediawiki...SecurePoll)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52387 Change subject: Americal spelling - authorize/initialize/normalize/recognize (messages and comments only) .. Americal spelling - authorize/initialize/normalize/recognize (messages and comments only) Change-Id: Ib75e3c8a22ad698e1f9d31d417ed3b51ef6205d5 --- M SecurePoll.i18n.php M SecurePoll.sql M cli/testDebian.php M cli/wm-scripts/dumpMetaTranslations.php M includes/ballots/Ballot.php M includes/entities/Election.php M includes/main/Store.php M includes/pages/Page.php M includes/pages/VotePage.php M includes/user/Auth.php M includes/user/Voter.php 11 files changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/87/52387/1 diff --git a/SecurePoll.i18n.php b/SecurePoll.i18n.php index 3a3c40b..8a3984f 100644 --- a/SecurePoll.i18n.php +++ b/SecurePoll.i18n.php @@ -65,9 +65,9 @@ 'securepoll-invalid-score' = 'The score must be a number between $1 and $2.', 'securepoll-unanswered-options' = 'You must give a response for every question.', - # Authorisation related + # Authorization related 'securepoll-remote-auth-error' = 'Error fetching your account information from the server.', - 'securepoll-remote-parse-error' = 'Error interpreting the authorisation response from the server.', + 'securepoll-remote-parse-error' = 'Error interpreting the authorization response from the server.', 'securepoll-api-invalid-params' = 'Invalid parameters.', 'securepoll-api-no-user' = 'No user was found with the given ID.', @@ -79,7 +79,7 @@ 'securepoll-blocked-centrally' = 'Sorry, you cannot vote in this election as you are blocked on at least $1 {{PLURAL:$1|wiki|wikis}}.', 'securepoll-bot' = 'Sorry, accounts with the bot flag are not allowed to vote in this election.', 'securepoll-not-in-group' = 'Only members of the $1 group can vote in this election.', - 'securepoll-not-in-list' = 'Sorry, you are not in the predetermined list of users authorised to vote in this election.', + 'securepoll-not-in-list' = 'Sorry, you are not in the predetermined list of users authorized to vote in this election.', 'securepoll-custom-unqualified' = '$1', # List page diff --git a/SecurePoll.sql b/SecurePoll.sql index a198e8a..f87527a 100644 --- a/SecurePoll.sql +++ b/SecurePoll.sql @@ -68,7 +68,7 @@ -- End date, in 14-char MW format el_end_date varbinary(14), - -- User authorisation type, see Auth.php + -- User authorization type, see Auth.php el_auth_type varbinary(32) not null ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/spel_title ON /*_*/securepoll_elections (el_title); @@ -132,14 +132,14 @@ -- securepoll_voters.voter_id vote_voter int not null, - -- Denormalised fields from the user table for efficient sorting + -- Denormalized fields from the user table for efficient sorting -- securepoll_voters.voter_name vote_voter_name varchar(255) binary not null, -- securepoll_voters.voter_domain vote_voter_domain varbinary(32) not null, - -- Denormalised field from the strike table + -- Denormalized field from the strike table -- 1 if struck, 0 if not struck vote_struck tinyint not null, diff --git a/cli/testDebian.php b/cli/testDebian.php index e342b2c..f3e02de 100644 --- a/cli/testDebian.php +++ b/cli/testDebian.php @@ -50,7 +50,7 @@ } $line = trim( $line ); if ( !preg_match( '/^V: ([0-9-]*)$/', $line, $m ) ) { - echo Skipping unrecognised line $line\n; + echo Skipping unrecognized line $line\n; continue; } diff --git a/cli/wm-scripts/dumpMetaTranslations.php b/cli/wm-scripts/dumpMetaTranslations.php index 7f3fcfd..9dc68f9 100644 --- a/cli/wm-scripts/dumpMetaTranslations.php +++ b/cli/wm-scripts/dumpMetaTranslations.php @@ -173,7 +173,7 @@ continue; } - fwrite( STDERR, Unrecognised section \$sectionName\ in $lang\n ); + fwrite( STDERR, Unrecognized section \$sectionName\ in $lang\n ); } fwrite( STDERR, [[$titleText]]: found . $numMessages . messages\n ); diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php index a731564..f349a40 100644 --- a/includes/ballots/Ballot.php +++ b/includes/ballots/Ballot.php @@ -195,7 +195,7 @@ # Get voter from session $voter = $auth-getVoterFromSession( $this-election ); # If there's no session, try creating one. - # This will fail if the user is not authorised to vote in the election + #
[MediaWiki-commits] [Gerrit] Handle gracefully if Solr is not running - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Handle gracefully if Solr is not running .. Handle gracefully if Solr is not running Change-Id: I3cc00721a21290514861e4a34f88c7873b8f189b --- M TranslateSearch.i18n.php M specials/SpecialSearchTranslations.php 2 files changed, 15 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/TranslateSearch.i18n.php b/TranslateSearch.i18n.php index a166f59..281c593 100644 --- a/TranslateSearch.i18n.php +++ b/TranslateSearch.i18n.php @@ -26,6 +26,9 @@ 'tux-sst-nosolr-title' = 'Search unavailable', 'tux-sst-nosolr-body' = 'This wiki does not have a translation search service.', + 'tux-sst-solr-offline-title' = 'Search unavailable', + 'tux-sst-solr-offline-body' = 'Search service is temporarily unavailable.', + ); /** Message documentation (Message documentation) @@ -54,6 +57,12 @@ 'tux-sst-nosolr-body' = 'Used as error message. The page title for this message is {{msg-mw|Tux-sst-nosolr-title}}.', + 'tux-sst-solr-offline-title' = 'Used as title of error page. + +The body of error message is {{msg-mw|Tux-sst-solr-offline-body}}.', + 'tux-sst-solr-offline-body' = 'Used as error message. + +The page title for this message is {{msg-mw|tux-sst-solr-offline-title}}.', ); /** Asturian (asturianu) diff --git a/specials/SpecialSearchTranslations.php b/specials/SpecialSearchTranslations.php index fbc9277..06fab93 100644 --- a/specials/SpecialSearchTranslations.php +++ b/specials/SpecialSearchTranslations.php @@ -71,7 +71,12 @@ return; } - $resultset = $this-doSearch( $server-getSolarium(), $queryString ); + try { + $resultset = $this-doSearch( $server-getSolarium(), $queryString ); + } catch ( Solarium_Client_HttpException $e ) { + error_log( 'Translate: Solr search server unavailable' ); + throw new ErrorPageError( 'tux-sst-solr-offline-title', 'tux-sst-solr-offline-body' ); + } // Part 1: facets $facets = ''; -- To view, visit https://gerrit.wikimedia.org/r/52374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3cc00721a21290514861e4a34f88c7873b8f189b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45505) Removing isSaveDisabled() from claimview - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: (bug 45505) Removing isSaveDisabled() from claimview .. (bug 45505) Removing isSaveDisabled() from claimview Since there should be no specific toolbar interactions in claimview anymore, saveDisabled() does not belong there. Its purpose got already replaced by isValid(). This change fixes enter key handling when saving a claim. Change-Id: I2069762ab47dd0d8fcebd922e1e3cce32684fd0d --- M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 2 files changed, 3 insertions(+), 19 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js index 2d45431..3ef8e39 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js @@ -351,7 +351,7 @@ .on( this._lmwEvent( 'stopediting' ), function( event, dropValue ) { var newSnak = self._lmwInstance( $newClaim ).$mainSnak.data( 'snakview' ).snak(); - if ( self._lmwInstance( $newClaim ).isSaveDisabled() !dropValue ) { + if ( !self._lmwInstance( $newClaim ).isValid() !dropValue ) { event.preventDefault(); return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index 635e5fb..b683eff 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -115,12 +115,6 @@ _isInEditMode: false, /** -* Whether saving is (currently) disabled. -* @type {boolean} -*/ - _saveDisabled: false, - - /** * Whether the widget is currently valid according to its contents. * @type {boolean} */ @@ -145,7 +139,7 @@ } ) .on( 'snakviewstopediting', function( event, dropValue ) { // React on key stroke events (e.g. pressing enter or ESC key) - if ( self.isSaveDisabled() !dropValue ) { + if ( !self.isValid() !dropValue ) { event.preventDefault(); return; } @@ -232,7 +226,7 @@ stopEditing: $.NativeEventHandler( 'stopEditing', { // don't stop edit mode or trigger event if not in edit mode currently: initially: function( e, dropValue ) { - if( !this.isInEditMode() || this._saveDisabled !dropValue ) { + if( !this.isInEditMode() || !this.isValid() !dropValue ) { e.cancel(); } @@ -423,16 +417,6 @@ */ enable: function() { this.$mainSnak.data( 'snakview' ).enable(); - }, - - /** -* Returns whether saving is currently disabled. -* @since 0.4 -* -* @return {boolean} -*/ - isSaveDisabled: function() { - return this._saveDisabled; }, /** -- To view, visit https://gerrit.wikimedia.org/r/52024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2069762ab47dd0d8fcebd922e1e3cce32684fd0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added FieldDefinition::mutateFields - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added FieldDefinition::mutateFields .. Added FieldDefinition::mutateFields Change-Id: I81ab9fbea643403c173094985ba5fcf977af1181 --- M repo/includes/Database/TableDefinition.php M repo/includes/Query/SQLStore/Setup.php M repo/tests/phpunit/includes/Database/TableDefinitionTest.php 3 files changed, 45 insertions(+), 5 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/Database/TableDefinition.php b/repo/includes/Database/TableDefinition.php index a280d27..00df142 100644 --- a/repo/includes/Database/TableDefinition.php +++ b/repo/includes/Database/TableDefinition.php @@ -70,6 +70,10 @@ $this-fields = array(); foreach ( $fields as $field ) { + if ( !( $field instanceof FieldDefinition ) ) { + throw new InvalidArgumentException( 'All table fields should be of type FieldDefinition' ); + } + if ( array_key_exists( $field-getName(), $this-fields ) ) { throw new InvalidArgumentException( 'A table cannot have two fields with the same name' ); } @@ -124,10 +128,23 @@ * * @return TableDefinition */ - public function getClone( $cloneName ) { + public function mutateName( $cloneName ) { return new self( $cloneName, $this-fields ); } + /** +* Returns a clone of the table, though with the provided fields rather then the original ones. +* +* @since wd.db +* +* @param FieldDefinition[] $fields +* +* @return TableDefinition +*/ + public function mutateFields( array $fields ) { + return new self( $this-name, $fields ); + } + // TODO: multiple field indices } diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 0d82f63..0224934 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -123,7 +123,7 @@ */ foreach ( $this-config-getDataValueHandlers() as $dataValueHandler ) { $table = $dataValueHandler-getTableDefinition(); - $table = $table-getClone( $this-config-getTablePrefix() . $table-getName() ); + $table = $table-mutateName( $this-config-getTablePrefix() . $table-getName() ); $dvTables[] = $table; } diff --git a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php index 28f2bf1..6c229da 100644 --- a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php +++ b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php @@ -121,16 +121,39 @@ * * @param TableDefinition $table */ - public function testGetClone( TableDefinition $table ) { - $newTable = $table-getClone( $table-getName() ); + public function testMutateName( TableDefinition $table ) { + $newTable = $table-mutateName( $table-getName() ); $this-assertInstanceOf( get_class( $table ), $newTable ); $this-assertEquals( $table, $newTable ); - $newTable = $table-getClone( 'foobarbaz' ); + $newTable = $table-mutateName( 'foobarbaz' ); $this-assertEquals( 'foobarbaz', $newTable-getName() ); $this-assertEquals( $table-getFields(), $newTable-getFields() ); } + /** +* @dataProvider instanceProvider +* +* @param TableDefinition $table +*/ + public function testMutateFields( TableDefinition $table ) { + $newTable = $table-mutateFields( $table-getFields() ); + + $this-assertInstanceOf( get_class( $table ), $newTable ); + $this-assertEquals( $table, $newTable ); + + $fields = array( + new FieldDefinition( 'h', FieldDefinition::TYPE_TEXT ), + new FieldDefinition( 'a', FieldDefinition::TYPE_BOOLEAN ), + new FieldDefinition( 'x', FieldDefinition::TYPE_INTEGER ), + ); + + $newTable = $table-mutateFields( $fields ); + + $this-assertEquals( $fields, array_values( $newTable-getFields() ) ); + $this-assertEquals( $table-getName(), $newTable-getName() ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/52366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81ab9fbea643403c173094985ba5fcf977af1181 Gerrit-PatchSet: 1 Gerrit-Project:
[MediaWiki-commits] [Gerrit] (bug 45505) Toggle action message on stopediting event - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: (bug 45505) Toggle action message on stopediting event .. (bug 45505) Toggle action message on stopediting event In order to display the saving... message when saving by hitting the enter key, the action message has to be toggled when listening to the interaction widget's stopediting event. Change-Id: Ibb1531ae8ede116ec7fac56c11fcb43d2f180fb9 --- M lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js b/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js index eacb37c..a0e13a1 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js @@ -136,7 +136,6 @@ this.editGroup.on( 'save', function( e ) { e.preventDefault(); // Prevent auto-transforming toolbar to non-edit mode. - self.toggleActionMessage( { message: 'wikibase-save-inprogress' } ); self._interactionWidget.stopEditing(); } ); @@ -152,8 +151,12 @@ .on( prefix + 'afterstartediting', function( event ) { self.editGroup.toEditMode(); } ) - .on( prefix + 'stopediting', function( event ) { + .on( prefix + 'stopediting', function( event, dropValue ) { self.disable(); + // Toggling action message here in order to react on pressing the enter key. + if ( !dropValue ) { + self.toggleActionMessage( { message: 'wikibase-save-inprogress' } ); + } } ) .on( prefix + 'afterstopediting', function( event ) { self.editGroup.toNonEditMode(); -- To view, visit https://gerrit.wikimedia.org/r/52025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb1531ae8ede116ec7fac56c11fcb43d2f180fb9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added some stub code in the SQLStore QueryEngine - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/52388 Change subject: Added some stub code in the SQLStore QueryEngine .. Added some stub code in the SQLStore QueryEngine Change-Id: If3b155a1bb791a374560cb5e6c347caa52cb5cf8 --- M repo/includes/Query/SQLStore/Engine.php 1 file changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/88/52388/1 diff --git a/repo/includes/Query/SQLStore/Engine.php b/repo/includes/Query/SQLStore/Engine.php index 3cd5b31..28e76e9 100644 --- a/repo/includes/Query/SQLStore/Engine.php +++ b/repo/includes/Query/SQLStore/Engine.php @@ -2,10 +2,14 @@ namespace Wikibase\Repo\Query\SQLStore; -use Ask\Language\Query; use Wikibase\Repo\Query\QueryEngineResult; use Wikibase\Repo\Query\QueryEngine; use Wikibase\Repo\Database\QueryInterface; + +use Ask\Language\Query; +use Ask\Language\Description\Description; +use Ask\Language\Option\QueryOptions; +use Ask\Language\Selection\SelectionRequest; /** * Simple query engine that works on top of the SQLStore. @@ -72,6 +76,40 @@ * @return QueryEngineResult */ public function runQuery( Query $query ) { + $internalEntityIds = $this-findQueryMatches( $query-getDescription(), $query-getOptions() ); + + $result = $this-selectRequestedFields( $internalEntityIds, $query-getSelectionRequests() ); + + return $result; + } + + /** +* Finds all entities that match the selection criteria. +* The matching entities are returned as an array of internal entity ids. +* +* @since wd.qe +* +* @param Description $description +* @param QueryOptions $options +* +* @return int[] +*/ + private function findQueryMatches( Description $description, QueryOptions $options ) { + // TODO + } + + /** +* Selects all the quested data from the matching entities. +* This data is put in a QueryEngineResult object which is then returned. +* +* @since wd.qe +* +* @param array $internalEntityIds +* @param array $query +* +* @return QueryEngineResult +*/ + private function selectRequestedFields( array $internalEntityIds, array $query ) { // TODO } -- To view, visit https://gerrit.wikimedia.org/r/52388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3b155a1bb791a374560cb5e6c347caa52cb5cf8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - summarize - change (mediawiki...Contributors)
Siebrand has submitted this change and it was merged. Change subject: American spelling - summarize .. American spelling - summarize Change-Id: I6c3e6b39a845115576ce6d2ec449acd089b26376 --- M Contributors.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/Contributors.i18n.php b/Contributors.i18n.php index 75b9ac2..b17c934 100644 --- a/Contributors.i18n.php +++ b/Contributors.i18n.php @@ -14,7 +14,7 @@ */ $messages['en'] = array( 'contributors' = 'Contributors', - 'contributors-desc'= 'Summarises the main contributors to a page', + 'contributors-desc'= 'Summarizes the main contributors to a page', 'contributors-toolbox' = 'Main contributors', 'contributors-legend' = 'List main contributors to a page', 'contributors-target' = 'Title:', -- To view, visit https://gerrit.wikimedia.org/r/52385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c3e6b39a845115576ce6d2ec449acd089b26376 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Contributors Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45769) make string datatype non-experimental - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/52389 Change subject: (bug 45769) make string datatype non-experimental .. (bug 45769) make string datatype non-experimental Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 --- M lib/config/WikibaseLib.default.php M lib/config/WikibaseLib.experimental.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/89/52389/1 diff --git a/lib/config/WikibaseLib.default.php b/lib/config/WikibaseLib.default.php index aeb4d48..c3a8bfd 100644 --- a/lib/config/WikibaseLib.default.php +++ b/lib/config/WikibaseLib.default.php @@ -93,4 +93,5 @@ $wgWBSettings['dataTypes'] = array( 'wikibase-item', 'commonsMedia', + 'string', ); diff --git a/lib/config/WikibaseLib.experimental.php b/lib/config/WikibaseLib.experimental.php index 0bb6ed7..3ea4f7e 100644 --- a/lib/config/WikibaseLib.experimental.php +++ b/lib/config/WikibaseLib.experimental.php @@ -41,7 +41,6 @@ 'monolingual-text', 'multilingual-text', 'time', - 'string', ) ); $wgAutoloadClasses['Wikibase\Query'] = __DIR__ . '/../includes/query/Query.php'; -- To view, visit https://gerrit.wikimedia.org/r/52389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work on SQLStore setup - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Work on SQLStore setup .. Work on SQLStore setup Change-Id: I9d6b5e39a07f74450deacfb8522be3c0ed56c7b5 --- M repo/includes/Query/SQLStore/Setup.php M repo/includes/Query/SQLStore/StoreConfig.php M repo/tests/phpunit/includes/Query/SQLStore/SetupTest.php 3 files changed, 93 insertions(+), 45 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 0224934..58d1a44 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -115,6 +115,19 @@ * * @return TableDefinition[] */ + private function getTables() { + // TODO: setup dv tables for different levels of snaks + // TODO: setup id tracking tables + // TODO: setup stats tables + + return array_merge( $this-getNonDVTables(), $this-getDVTables() ); + } + + /** +* TODO +* +* @return TableDefinition[] +*/ private function getDVTables() { $dvTables = array(); @@ -122,10 +135,39 @@ * @var DataValueHandler $dataValueHandler */ foreach ( $this-config-getDataValueHandlers() as $dataValueHandler ) { - $table = $dataValueHandler-getTableDefinition(); - $table = $table-mutateName( $this-config-getTablePrefix() . $table-getName() ); + foreach ( array( 'msnak_', 'qualifier_' ) as $snakLevel ) { + $table = $dataValueHandler-getTableDefinition(); + $table = $table-mutateName( $snakLevel . $table-getName() ); - $dvTables[] = $table; + $table = $table-mutateFields( + array_merge( + array( + // Internal claim id + new FieldDefinition( + 'claim_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Internal property id + new FieldDefinition( + 'property_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ), + $table-getFields() + ) + ); + + $dvTables[] = $table; + } } return $dvTables; @@ -138,6 +180,9 @@ */ private function getNonDVTables() { $tables = array(); + + // TODO: multi field indexes + // TODO: more optimal types // Id map with Wikibase EntityId to internal SQL store id $tables[] = new TableDefinition( @@ -247,6 +292,19 @@ } /** +* Returns the provided table with the configs table prefix prepended to the name of the table. +* +* @since wd.qe +* +* @param TableDefinition $tableDefinition +* +* @return TableDefinition +*/ + private function getPrefixedTable( TableDefinition $tableDefinition ) { + return $tableDefinition-mutateName( $this-config-getTablePrefix() . $tableDefinition-getName() ); + } + + /** * Sets up the tables of the store. * * @since wd.qe @@ -256,13 +314,10 @@ private function setupTables() {
[MediaWiki-commits] [Gerrit] [bug 45770] Drop NEW status from SQL query of getBugsPerProd... - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52390 Change subject: [bug 45770] Drop NEW status from SQL query of getBugsPerProduct() and clarify description .. [bug 45770] Drop NEW status from SQL query of getBugsPerProduct() and clarify description Change-Id: I6d3752ec0ea719c2d19c243d80af2982aada6b1f --- M templates/misc/bugzilla_report.php 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/52390/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..9715398 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -2,7 +2,7 @@ ?php error_reporting(E_ALL); function getBugsPerProduct ($begin_date,$end_date) { -print New bugs per product\n\n; +print Created reports per product\n\n; return END SELECT name, count(*) @@ -13,8 +13,7 @@ on product_id = products.id WHERE -bug_status = 'NEW' -and creation_ts +creation_ts BETWEEN $begin_date and -- To view, visit https://gerrit.wikimedia.org/r/52390 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d3752ec0ea719c2d19c243d80af2982aada6b1f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite non-TUX urls in TUX mode - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/52391 Change subject: Rewrite non-TUX urls in TUX mode .. Rewrite non-TUX urls in TUX mode Bug: 45334 Change-Id: Id08f259480c6379320e09f19420dc6d20f886eb2 --- M specials/SpecialTranslate.php 1 file changed, 49 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/91/52391/1 diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php index 84d353c..2375f4e 100644 --- a/specials/SpecialTranslate.php +++ b/specials/SpecialTranslate.php @@ -240,7 +240,6 @@ $defaults = array( /* str */ 'taction' = 'translate', /* str */ 'task' = $isBeta ? 'custom' : 'untranslated', - /* str */ 'sort' = 'normal', /* str */ 'language' = $this-getLanguage()-getCode(), /* str */ 'group'= $isBeta ? '!additions': '', /* str */ 'offset' = '', // Used to be int, now str @@ -301,6 +300,16 @@ } } + if ( $isBeta ) { + /* @todo fix all the places in Translate to create correct links. +* The least effort way is to change them once we totally drop the +* old UI. The penalty is only http redirect in some cases. More +* effort would be to create utilities like makeTranslationLink +* and makeProofreadLink. +*/ + $this-rewriteLegacyUrls( $nondefaults ); + } + $this-defaults = $defaults; $this-nondefaults = $nondefaults; wfRunHooks( 'TranslateGetSpecialTranslateOptions', array( $defaults, $nondefaults ) ); @@ -314,6 +323,45 @@ } } + protected function rewriteLegacyUrls( $params ) { + if ( !isset( $params['task'] ) || $params['task'] === 'custom' ) { + return; + } + + // Not used in TUX + unset( $params['taction'], $params['limit'], $params['offset'] ); + + $out = $this-getOutput(); + + switch ( $params['task'] ) { + case 'reviewall': + case 'acceptqueue': + // @todo handle these two separately + unset( $params['task'] ); + $params['action'] = 'proofread'; + $out-redirect( $this-getTitle()-getLocalUrl( $params ) ); + break; + + case 'view': + unset( $params['task'] ); + $params['filter'] = ''; + $out-redirect( $this-getTitle()-getLocalUrl( $params ) ); + break; + + // Optional and suggestions do not directly map to the new UI. + // Handle them as untranslated. + case 'optional': + $params['optional'] = 1; + case 'suggestions': + case 'untranslated': + unset( $params['task'] ); + $params['filter'] = '!translated'; + $out-redirect( $this-getTitle()-getLocalUrl( $params ) ); + break; + } + + } + protected function settingsForm( $errors ) { global $wgScript; -- To view, visit https://gerrit.wikimedia.org/r/52391 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id08f259480c6379320e09f19420dc6d20f886eb2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Drop NEW status from SQL query of getBugsPerComp... - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52392 Change subject: [bug 45770] Drop NEW status from SQL query of getBugsPerComponent() and clarify description .. [bug 45770] Drop NEW status from SQL query of getBugsPerComponent() and clarify description Change-Id: Ie54ea6018a5f9b03aed4f60bdd34428b673fe760 --- M templates/misc/bugzilla_report.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/52392/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..25eb3f4 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -26,7 +26,7 @@ } function getBugsPerComponent ($begin_date,$end_date) { -print New bugs per component\n\n; +print Created reports per component\n\n; return END SELECT name, count(*) as total @@ -37,8 +37,6 @@ on component_id = components.id WHERE -bug_status = 'NEW' -and creation_ts BETWEEN $begin_date -- To view, visit https://gerrit.wikimedia.org/r/52392 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie54ea6018a5f9b03aed4f60bdd34428b673fe760 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Clarify description of getBugsResolvedPerUser() - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52393 Change subject: [bug 45770] Clarify description of getBugsResolvedPerUser() .. [bug 45770] Clarify description of getBugsResolvedPerUser() Change-Id: Ifb8ac31a90d67485db783429e952373587c2ed0e --- M templates/misc/bugzilla_report.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/52393/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..ee7b0e6 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -56,7 +56,7 @@ } function getBugsResolvedPerUser($begin_date,$end_date) { -print Top 5 bug report closers\n\n; +print Top 5 bug report resolvers\n\n; return END SELECT login_name, count(*) as total -- To view, visit https://gerrit.wikimedia.org/r/52393 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb8ac31a90d67485db783429e952373587c2ed0e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added MonolingualTextHandler - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added MonolingualTextHandler .. Added MonolingualTextHandler Change-Id: Iba9aeb9904d75786d01bbe61b76ed77443188e1b --- M repo/config/Wikibase.experimental.php A repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php A repo/tests/phpunit/includes/Query/SQLStore/DVHandler/MonolingualTextHandlerTest.php 3 files changed, 231 insertions(+), 0 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/config/Wikibase.experimental.php b/repo/config/Wikibase.experimental.php index ea3015b..1ea0f32 100644 --- a/repo/config/Wikibase.experimental.php +++ b/repo/config/Wikibase.experimental.php @@ -66,6 +66,7 @@ 'Wikibase\Repo\Query\SQLStore\DVHandler\BooleanHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\EntityIdHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\GeoCoordinateHandler', + 'Wikibase\Repo\Query\SQLStore\DVHandler\MonolingualTextHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\NumberHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\StringHandler', @@ -151,6 +152,7 @@ 'Query/SQLStore/DVHandler/BooleanHandler', 'Query/SQLStore/DVHandler/EntityIdHandler', 'Query/SQLStore/DVHandler/GeoCoordinateHandler', + 'Query/SQLStore/DVHandler/MonolingualTextHandler', 'Query/SQLStore/DVHandler/NumberHandler', 'Query/SQLStore/DVHandler/StringHandler', diff --git a/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php b/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php new file mode 100644 index 000..af658d8 --- /dev/null +++ b/repo/includes/Query/SQLStore/DVHandler/MonolingualTextHandler.php @@ -0,0 +1,153 @@ +?php + +namespace Wikibase\Repo\Query\SQLStore\DVHandler; + +use Wikibase\Repo\Query\SQLStore\DataValueHandler; +use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; +use DataValues\DataValue; +use DataValues\MonolingualTextValue; +use InvalidArgumentException; + +/** + * Represents the mapping between DataValues\MonolingualTextValue and + * the corresponding table in the store. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since wd.qe + * + * @file + * @ingroup WikibaseSQLStore + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class MonolingualTextHandler extends DataValueHandler { + + /** +* @see DataValueHandler::getTableDefinition +* +* @since wd.qe +* +* @return TableDefinition +*/ + public function getTableDefinition() { + $fields = array( + new FieldDefinition( 'text', FieldDefinition::TYPE_TEXT, false ), + new FieldDefinition( 'language', FieldDefinition::TYPE_TEXT, false ), + new FieldDefinition( 'json', FieldDefinition::TYPE_TEXT, false ), + ); + + return new TableDefinition( 'mono_text', $fields ); + } + + /** +* @see DataValueHandler::getValueFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getValueFieldName() { + return 'json'; + } + + /** +* @see DataValueHandler::getSortFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getSortFieldName() { + return 'text'; + } + + /** +* @see DataValueHandler::getLabelFieldName +* +* @since wd.qe +* +* @return string|null +*/ + public function getLabelFieldName() { + return 'text'; + } + + /** +* @see DataValueHandler::newDataValueFromValueField +* +* @since wd.qe +* +* @param $valueFieldValue // TODO: mixed or string? +* +* @return DataValue +*/ + public function newDataValueFromValueField( $valueFieldValue ) { + return
[MediaWiki-commits] [Gerrit] [bug 45770] Add TODO to check query for getBugResolutions() - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52394 Change subject: [bug 45770] Add TODO to check query for getBugResolutions() .. [bug 45770] Add TODO to check query for getBugResolutions() Change-Id: Ice0a05117f30d0e1057dcc4e2ed27f0a7ac81c60 --- M templates/misc/bugzilla_report.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/52394/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..85470ce 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -83,7 +83,7 @@ 5; END; } - +/* TODO: Check if this really refers to resolution setting, and not to random changes in last week plus current resolution X */ function getBugResolutions($begin_date, $end_date, $resolution) { $resolution = mysql_real_escape_string($resolution); $resolution = '$resolution'; -- To view, visit https://gerrit.wikimedia.org/r/52394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice0a05117f30d0e1057dcc4e2ed27f0a7ac81c60 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Make getTotalOpenBugs() also include bugs in UNC... - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52395 Change subject: [bug 45770] Make getTotalOpenBugs() also include bugs in UNCONFIRMED status .. [bug 45770] Make getTotalOpenBugs() also include bugs in UNCONFIRMED status Change-Id: Iecd02585229cae21dc9e5c2b129ed0da03c71582 --- M templates/misc/bugzilla_report.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/52395/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..6b386cf 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -129,6 +129,7 @@ FROM bugs WHERE +bug_status = 'UNCONFIRMED' or bug_status = 'ASSIGNED' or bug_status = 'NEW' or bug_status = 'REOPENED'; -- To view, visit https://gerrit.wikimedia.org/r/52395 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecd02585229cae21dc9e5c2b129ed0da03c71582 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added IriHandler - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added IriHandler .. Added IriHandler Change-Id: Ic0eaf9d2e6b8e1996209bae5ec91e7061f0bc3bb --- M repo/config/Wikibase.experimental.php A repo/includes/Query/SQLStore/DVHandler/IriHandler.php A repo/tests/phpunit/includes/Query/SQLStore/DVHandler/IriHandlerTest.php 3 files changed, 241 insertions(+), 0 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/config/Wikibase.experimental.php b/repo/config/Wikibase.experimental.php index 1ea0f32..dac9a88 100644 --- a/repo/config/Wikibase.experimental.php +++ b/repo/config/Wikibase.experimental.php @@ -66,6 +66,7 @@ 'Wikibase\Repo\Query\SQLStore\DVHandler\BooleanHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\EntityIdHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\GeoCoordinateHandler', + 'Wikibase\Repo\Query\SQLStore\DVHandler\IriHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\MonolingualTextHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\NumberHandler', 'Wikibase\Repo\Query\SQLStore\DVHandler\StringHandler', @@ -152,6 +153,7 @@ 'Query/SQLStore/DVHandler/BooleanHandler', 'Query/SQLStore/DVHandler/EntityIdHandler', 'Query/SQLStore/DVHandler/GeoCoordinateHandler', + 'Query/SQLStore/DVHandler/IriHandler', 'Query/SQLStore/DVHandler/MonolingualTextHandler', 'Query/SQLStore/DVHandler/NumberHandler', 'Query/SQLStore/DVHandler/StringHandler', diff --git a/repo/includes/Query/SQLStore/DVHandler/IriHandler.php b/repo/includes/Query/SQLStore/DVHandler/IriHandler.php new file mode 100644 index 000..4dc25a5 --- /dev/null +++ b/repo/includes/Query/SQLStore/DVHandler/IriHandler.php @@ -0,0 +1,162 @@ +?php + +namespace Wikibase\Repo\Query\SQLStore\DVHandler; + +use Wikibase\Repo\Query\SQLStore\DataValueHandler; +use Wikibase\Repo\Database\TableDefinition; +use Wikibase\Repo\Database\FieldDefinition; +use Wikibase\Repo\Database\FieldDefinition as FD; +use DataValues\DataValue; +use DataValues\IriValue; +use InvalidArgumentException; + +/** + * Represents the mapping between DataValues\IriValue and + * the corresponding table in the store. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since wd.qe + * + * @file + * @ingroup WikibaseSQLStore + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class IriHandler extends DataValueHandler { + + /** +* @see DataValueHandler::getTableDefinition +* +* @since wd.qe +* +* @return TableDefinition +*/ + public function getTableDefinition() { + $fields = array( + new FieldDefinition( 'scheme', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'fragment', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'query', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'hierp', FD::TYPE_TEXT, FD::NOT_NULL ), + + new FieldDefinition( 'iri', FD::TYPE_TEXT, FD::NOT_NULL ), + new FieldDefinition( 'json', FD::TYPE_TEXT, FD::NOT_NULL ), + ); + + return new TableDefinition( 'iri', $fields ); + } + + /** +* @see DataValueHandler::getValueFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getValueFieldName() { + return 'json'; + } + + /** +* @see DataValueHandler::getSortFieldName +* +* @since wd.qe +* +* @return string +*/ + public function getSortFieldName() { + return 'iri'; + } + + /** +* @see DataValueHandler::getLabelFieldName +* +* @since wd.qe +* +* @return string|null +*/ + public function getLabelFieldName() { + return 'iri'; + } + + /** +* @see DataValueHandler::newDataValueFromValueField +*
[MediaWiki-commits] [Gerrit] Adjustments for empty list message - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Adjustments for empty list message .. Adjustments for empty list message Size and layout adjustments for the message that is displayed for empty message lists. Change-Id: I06ab33eb1f9ddded0ac8d6b672042751969376dd --- M resources/css/ext.translate.messagetable.css 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/css/ext.translate.messagetable.css b/resources/css/ext.translate.messagetable.css index 032499c..e8c998b 100644 --- a/resources/css/ext.translate.messagetable.css +++ b/resources/css/ext.translate.messagetable.css @@ -345,23 +345,27 @@ vertical-align: middle; } -.tux-empty-list div { - margin: 5px; +.tux-empty-list { + padding: 20px; } .tux-empty-list-header { font-size: 25px; + padding: 5px 0; } .tux-empty-list-guide { - font-size: 14px; + font-size: 15px; color: #565656; + padding: 5px 0; } .tux-empty-list-actions { font-size: 15px; + padding: 8px 0; } .tux-empty-list-actions a { cursor: pointer; + margin: 0 10px } -- To view, visit https://gerrit.wikimedia.org/r/52386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06ab33eb1f9ddded0ac8d6b672042751969376dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Update used parameters in and arrays - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52396 Change subject: [bug 45770] Update used parameters in and arrays .. [bug 45770] Update used parameters in and arrays Change-Id: I341a55128149e59174d1705db525f6fbe577c045 --- M templates/misc/bugzilla_report.php 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/52396/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..919885f 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -184,15 +184,16 @@ 'getBugsPerProduct', 'getBugsResolvedPerUser',); -$statesToRun = array('NEW', +$statesToRun = array('UNCONFIRMED', + 'NEW', 'ASSIGNED', 'REOPENED', - 'RESOLVED',); + 'RESOLVED', + 'VERIFIED',); -$resolutionsToRun = array('FIXED', 'REMIND', - 'INVALID','DUPLICATE', - 'WONTFIX','WORKSFORME', - 'LATER', 'MOVED',); +$resolutionsToRun = array('FIXED', 'DUPLICATE', + 'INVALID','WORKSFORME', + 'WONTFIX',); $totalStatistics = array ('getTotalOpenBugs',); -- To view, visit https://gerrit.wikimedia.org/r/52396 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I341a55128149e59174d1705db525f6fbe577c045 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Add TODO about deprecated mysql_connect() - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52397 Change subject: [bug 45770] Add TODO about deprecated mysql_connect() .. [bug 45770] Add TODO about deprecated mysql_connect() Change-Id: I5d657cec716f2f4b97a136fe7ba814d3f431d2ac --- M templates/misc/bugzilla_report.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/52397/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..3681b66 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -172,6 +172,7 @@ print MediaWiki Bugzilla Report for . date('F d, Y', $begin_date) . - . date('F d, Y', $end_date) . \n\n; +/* TODO: mysql_connect is deprecated - switch to MySQLi or PDO */ $ok = mysql_connect(db9.pmtpa.wmnet, bugs, %= scope.lookupvar('passwords::bugzilla::bugzilla_db_pass') %); if (!$ok) reportFailure(DB connection failure); -- To view, visit https://gerrit.wikimedia.org/r/52397 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d657cec716f2f4b97a136fe7ba814d3f431d2ac Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 45546) [TUX] Filtering by a word does not work for non-... - change (mediawiki...Translate)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/52398 Change subject: (Bug 45546) [TUX] Filtering by a word does not work for non-Latin scripts .. (Bug 45546) [TUX] Filtering by a word does not work for non-Latin scripts Regex using \\b will not work with non latin scripts. The closest working pattern is (^||\\s) assuming word boundaries are spaces Change-Id: I4980989b46ff94092d653a77262db77dfd87e2a5 --- M resources/js/ext.translate.messagetable.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/98/52398/1 diff --git a/resources/js/ext.translate.messagetable.js b/resources/js/ext.translate.messagetable.js index 341dc0a..8ffd459 100644 --- a/resources/js/ext.translate.messagetable.js +++ b/resources/js/ext.translate.messagetable.js @@ -269,7 +269,7 @@ search: function ( query ) { var resultCount = 0, $result, - matcher = new RegExp( '\\b' + escapeRegex( query ), 'i' ), + matcher = new RegExp( '(^|\\s)' + escapeRegex( query ), 'gi' ), itemsClass = { proofread: '.tux-message-proofread', page: '.tux-message-proofread', -- To view, visit https://gerrit.wikimedia.org/r/52398 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4980989b46ff94092d653a77262db77dfd87e2a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Add 'Reports created this week' item - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52399 Change subject: [bug 45770] Add 'Reports created this week' item .. [bug 45770] Add 'Reports created this week' item Change-Id: I486a6a3f4205a7c46ce655d7078e46d9f4f378ee --- M templates/misc/bugzilla_report.php 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/52399/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..f70dc3b 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -135,6 +135,20 @@ END; } +function getBugsCreated($begin_date, $end_date) { + return END +SELECT +count(*) +FROM +bugs +WHERE +creation_ts +BETWEEN +$begin_date +and +$end_date +END; +} function formatOutput($result) { while ($row = mysql_fetch_row($result)) { @@ -196,6 +210,7 @@ $totalStatistics = array ('getTotalOpenBugs',); +$createdStatistics = array('getBugsCreated',); print Status changes this week\n\n; foreach ($statesToRun as $state) { @@ -216,6 +231,15 @@ formatOutput($result); } +foreach ($createdStatistics as $report) { +$sql = getBugsCreated(date('Y-m-d', $begin_date),date('Y-m-d', $end_date)); +$result = mysql_query($sql); +if (!$result) + reportFailure( 'Query failure' ); +print \nReports created this week: ; +formatOutput( $result ); +} + print \nResolutions for the week:\n\n; foreach ($resolutionsToRun as $resolution) { $sql = getBugResolutions(date('Y-m-d',$begin_date),date('Y-m-d',$end_date), $resolution); -- To view, visit https://gerrit.wikimedia.org/r/52399 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I486a6a3f4205a7c46ce655d7078e46d9f4f378ee Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added table for valueless snaks - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added table for valueless snaks .. Added table for valueless snaks Change-Id: Icac0904b18bfc868a8633d388481c33ea0df752d --- M repo/includes/Query/SQLStore/Setup.php 1 file changed, 59 insertions(+), 21 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/Query/SQLStore/Setup.php b/repo/includes/Query/SQLStore/Setup.php index 58d1a44..9be3f8c 100644 --- a/repo/includes/Query/SQLStore/Setup.php +++ b/repo/includes/Query/SQLStore/Setup.php @@ -141,27 +141,7 @@ $table = $table-mutateFields( array_merge( - array( - // Internal claim id - new FieldDefinition( - 'claim_id', - FieldDefinition::TYPE_INTEGER, - FieldDefinition::NOT_NULL, - FieldDefinition::NO_DEFAULT, - FieldDefinition::ATTRIB_UNSIGNED, - FieldDefinition::INDEX - ), - - // Internal property id - new FieldDefinition( - 'property_id', - FieldDefinition::TYPE_INTEGER, - FieldDefinition::NOT_NULL, - FieldDefinition::NO_DEFAULT, - FieldDefinition::ATTRIB_UNSIGNED, - FieldDefinition::INDEX - ), - ), + $this-getPropertySnakFields(), $table-getFields() ) ); @@ -171,6 +151,35 @@ } return $dvTables; + } + + /** +* TODO +* +* @return FieldDefinition[] +*/ + private function getPropertySnakFields() { + return array( + // Internal claim id + new FieldDefinition( + 'claim_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Internal property id + new FieldDefinition( + 'property_id', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + ); } /** @@ -288,6 +297,35 @@ ) ); + // Table for snaks without a value + $tables[] = new TableDefinition( + 'valueless_snaks', + array_merge( + $this-getPropertySnakFields(), + array( + // Type of the snak + new FieldDefinition( + 'type', + FieldDefinition::TYPE_INTEGER, + FieldDefinition::NOT_NULL, + FieldDefinition::NO_DEFAULT, + FieldDefinition::ATTRIB_UNSIGNED, + FieldDefinition::INDEX + ), + + // Level at which the snak is used (ie main snak or qualifier) + new
[MediaWiki-commits] [Gerrit] [bug 45770] Minor description and layout improvements - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52400 Change subject: [bug 45770] Minor description and layout improvements .. [bug 45770] Minor description and layout improvements Change-Id: I4ab242b2f75e0b28f87e8a40ce5ffc1ce64a6997 --- M templates/misc/bugzilla_report.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/52400/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..098a716 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -203,7 +203,7 @@ $result = mysql_query($sql); if (!$result) reportFailure(Query failure); -print pack('A23A3',Bugs $state,:); +print pack('A34A3',Reports changed/set to $state,:); formatOutput($result); } @@ -212,7 +212,7 @@ $result = mysql_query($sql); if (!$result) reportFailure(Query failure); -print \nTotal bugs still open: ; +print \nTotal reports still open: ; formatOutput($result); } @@ -222,7 +222,7 @@ $result = mysql_query($sql); if (!$result) reportFailure(Query failure); -print pack('A23A3',Bugs marked $resolution,:); +print pack('A25A3',Reports marked $resolution,:); formatOutput($result); } print \nSpecific Product/Component Resolutions User Metrics \n\n; -- To view, visit https://gerrit.wikimedia.org/r/52400 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ab242b2f75e0b28f87e8a40ce5ffc1ce64a6997 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bug 45770] Add a getHighestPrioTickets() SQL query, not use... - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/52401 Change subject: [bug 45770] Add a getHighestPrioTickets() SQL query, not used yet .. [bug 45770] Add a getHighestPrioTickets() SQL query, not used yet Change-Id: I9dd761d21eb887cb7fd43045bac007e5f0f2ca73 --- M templates/misc/bugzilla_report.php 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/52401/1 diff --git a/templates/misc/bugzilla_report.php b/templates/misc/bugzilla_report.php index 6f9ea0f..102c1db 100755 --- a/templates/misc/bugzilla_report.php +++ b/templates/misc/bugzilla_report.php @@ -135,6 +135,33 @@ END; } +function getHighestPrioTickets() { +return END + +SELECT +products.name AS product, +components.name AS component, +bugs.bug_id, +bugs.short_desc as bugsummary, +profiles.login_name AS assignee, +bugs.delta_ts, +bugs.priority +FROM +bugs +JOIN +profiles ON assigned_to = profiles.userid +JOIN +products ON bugs.product_id = products.id +JOIN components ON bugs.component_id = components.id +WHERE +resolution = +AND +priority = Highest OR priority = Immediate +ORDER BY +product, component, delta_ts +LIMIT 200; +END; +} function formatOutput($result) { while ($row = mysql_fetch_row($result)) { -- To view, visit https://gerrit.wikimedia.org/r/52401 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dd761d21eb887cb7fd43045bac007e5f0f2ca73 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added some stub code in the SQLStore QueryEngine - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Added some stub code in the SQLStore QueryEngine .. Added some stub code in the SQLStore QueryEngine Change-Id: If3b155a1bb791a374560cb5e6c347caa52cb5cf8 --- M repo/includes/Query/SQLStore/Engine.php 1 file changed, 39 insertions(+), 1 deletion(-) Approvals: John Erling Blad: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/Query/SQLStore/Engine.php b/repo/includes/Query/SQLStore/Engine.php index 3cd5b31..28e76e9 100644 --- a/repo/includes/Query/SQLStore/Engine.php +++ b/repo/includes/Query/SQLStore/Engine.php @@ -2,10 +2,14 @@ namespace Wikibase\Repo\Query\SQLStore; -use Ask\Language\Query; use Wikibase\Repo\Query\QueryEngineResult; use Wikibase\Repo\Query\QueryEngine; use Wikibase\Repo\Database\QueryInterface; + +use Ask\Language\Query; +use Ask\Language\Description\Description; +use Ask\Language\Option\QueryOptions; +use Ask\Language\Selection\SelectionRequest; /** * Simple query engine that works on top of the SQLStore. @@ -72,6 +76,40 @@ * @return QueryEngineResult */ public function runQuery( Query $query ) { + $internalEntityIds = $this-findQueryMatches( $query-getDescription(), $query-getOptions() ); + + $result = $this-selectRequestedFields( $internalEntityIds, $query-getSelectionRequests() ); + + return $result; + } + + /** +* Finds all entities that match the selection criteria. +* The matching entities are returned as an array of internal entity ids. +* +* @since wd.qe +* +* @param Description $description +* @param QueryOptions $options +* +* @return int[] +*/ + private function findQueryMatches( Description $description, QueryOptions $options ) { + // TODO + } + + /** +* Selects all the quested data from the matching entities. +* This data is put in a QueryEngineResult object which is then returned. +* +* @since wd.qe +* +* @param array $internalEntityIds +* @param array $query +* +* @return QueryEngineResult +*/ + private function selectRequestedFields( array $internalEntityIds, array $query ) { // TODO } -- To view, visit https://gerrit.wikimedia.org/r/52388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3b155a1bb791a374560cb5e6c347caa52cb5cf8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45493) Do not consider empty string to mark a translati... - change (mediawiki...Translate)
Santhosh has submitted this change and it was merged. Change subject: (bug 45493) Do not consider empty string to mark a translation as unsaved Instead of checking length now updated code to check the content .. (bug 45493) Do not consider empty string to mark a translation as unsaved Instead of checking length now updated code to check the content Change-Id: I59b5b4d1811cf435c72d7796eff6fa6222fb77e1 --- M resources/js/ext.translate.editor.js 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Santhosh: Verified; Looks good to me, approved diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 75ae71e..7a84d3f 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -332,7 +332,14 @@ $textArea.on( 'input propertychange', function () { var $textArea = $( this ), $saveButton = translateEditor.$editor.find( '.tux-editor-save-button' ), - $pasteSourceButton = translateEditor.$editor.find( '.tux-editor-paste-original-button' ); + $pasteSourceButton = translateEditor.$editor.find( '.tux-editor-paste-original-button' ), + translationMessage = translateEditor.message.translation || ''; + + // Avoid Unsaved marking when translated message + // is not changed in content. + if ( translationMessage === $textArea.val() ) { + translateEditor.dirty = false; + } $saveButton.text( mw.msg( 'tux-editor-save-button-label' ) ); // When there is content in the editor -- To view, visit https://gerrit.wikimedia.org/r/52047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59b5b4d1811cf435c72d7796eff6fa6222fb77e1 Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Malkum dev.mal...@gmail.com Gerrit-Reviewer: Malkum dev.mal...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing position of colon + American spelling of normalize - change (mediawiki...AbuseFilter)
Siebrand has submitted this change and it was merged. Change subject: Changing position of colon + American spelling of normalize .. Changing position of colon + American spelling of normalize Change-Id: If1628dc6fa524bf849a186cc1e0c7987a9761ec8 --- M AbuseFilter.i18n.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php index 689f54e..5d3b907 100644 --- a/AbuseFilter.i18n.php +++ b/AbuseFilter.i18n.php @@ -24,7 +24,7 @@ 'abusefilter-mustbeeditor' = 'For security reasons, only users with the right to modify abuse filters may use this interface.', // Hooks - 'abusefilter-warning' = '''Warning''': This action has been automatically identified as harmful. + 'abusefilter-warning' = '''Warning:''' This action has been automatically identified as harmful. Unconstructive edits will be quickly reverted, and egregious or repeated unconstructive editing will result in your account or IP address being blocked. If you believe this action to be constructive, you may submit it again to confirm it. @@ -185,7 +185,7 @@ 'abusefilter-edit-status-label' = 'Statistics:', 'abusefilter-edit-status' = 'Of the last $1 {{PLURAL:$1|action|actions}}, this filter has matched $2 ($3%). On average, its run time is $4 ms, and it consumes $5 {{PLURAL:$5|condition|conditions}} of the condition limit.', - 'abusefilter-edit-throttled' = '''Warning''': This filter was automatically disabled as a safety measure. + 'abusefilter-edit-throttled' = '''Warning:''' This filter was automatically disabled as a safety measure. It reached the limit of matching more than $1% of actions., 'abusefilter-edit-new' = 'New filter', 'abusefilter-edit-save' = 'Save filter', @@ -283,10 +283,10 @@ 'abusefilter-edit-builder-group-funcs' = 'Functions', 'abusefilter-edit-builder-funcs-length' = 'String length (length)', 'abusefilter-edit-builder-funcs-lcase' = 'To lower case (lcase)', - 'abusefilter-edit-builder-funcs-ccnorm' = 'Normalise confusable characters (ccnorm)', + 'abusefilter-edit-builder-funcs-ccnorm' = 'Normalize confusable characters (ccnorm)', 'abusefilter-edit-builder-funcs-rmdoubles' = 'Remove double-characters (rmdoubles)', 'abusefilter-edit-builder-funcs-specialratio' = 'Special characters / total characters (specialratio)', - 'abusefilter-edit-builder-funcs-norm' = 'Normalise (norm)', + 'abusefilter-edit-builder-funcs-norm' = 'Normalize (norm)', 'abusefilter-edit-builder-funcs-count' = 'Number of times string X appears in string Y (count)', 'abusefilter-edit-builder-funcs-rcount' = 'Number of times regex X appears in string Y (rcount)', 'abusefilter-edit-builder-funcs-rmwhitespace' = 'Remove whitespace (rmwhitespace)', -- To view, visit https://gerrit.wikimedia.org/r/52318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1628dc6fa524bf849a186cc1e0c7987a9761ec8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing position of colon for consistency - change (mediawiki...ApiSandbox)
jenkins-bot has submitted this change and it was merged. Change subject: Changing position of colon for consistency .. Changing position of colon for consistency Change-Id: I1e5ca24259e6ee5781cadaf0d84171f4523bcd07 --- M ApiSandbox.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiSandbox.i18n.php b/ApiSandbox.i18n.php index 9971fae..0ff7495 100644 --- a/ApiSandbox.i18n.php +++ b/ApiSandbox.i18n.php @@ -11,7 +11,7 @@ $messages['en'] = array( 'apisb-desc' = 'Allows to debug [//www.mediawiki.org/wiki/API MediaWiki API] calls from browser', 'apisandbox' = 'API sandbox', - 'apisb-no-js' = '''Error''': this feature requires JavaScript., + 'apisb-no-js' = '''Error:''' this feature requires JavaScript., 'apisb-intro' = Use this page to experiment with the '''MediaWiki web service API'''. Refer to [//www.mediawiki.org/wiki/API:Main_page the API documentation] for further details of API usage. Example: [//www.mediawiki.org/wiki/API#A_simple_example get the content of a Main Page]. Select an action to see more examples., 'apisb-api-disabled' = 'API is disabled on this site.', -- To view, visit https://gerrit.wikimedia.org/r/52322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e5ca24259e6ee5781cadaf0d84171f4523bcd07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ApiSandbox Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make sort utils not static and move sort orders out of class - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/52402 Change subject: make sort utils not static and move sort orders out of class .. make sort utils not static and move sort orders out of class - also add support for alphabetic_sr (serbian) sort order Change-Id: Id67d84e32662807dc72fc5d6bd214219ff62b825 --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php M client/config/WikibaseClient.default.php A client/includes/InterwikiSorter.php D client/includes/SortUtils.php 5 files changed, 255 insertions(+), 181 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/02/52402/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 0a59dc4..4c556d7 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -552,7 +552,14 @@ if ( $useRepoLinks || Settings::get( 'alwaysSort' ) ) { // sort links - SortUtils::sortLinks( $parserOutput-getLanguageLinks() ); + $interwikiSorter = new InterwikiSorter( + Settings::get( 'sort' ), + Settings::get( 'interwikiSortOrders' ), + Settings::get( 'sortPrepend' ) + ); + $interwikiLinks = $parserOutput-getLanguageLinks(); + $sortedLinks = $interwikiSorter-sortLinks( $interwikiLinks ); + $parserOutput-setLanguageLinks( $sortedLinks ); } wfProfileOut( __METHOD__ ); diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 597a8a5..671d677 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -61,9 +61,9 @@ $wgAutoloadClasses['Wikibase\CachedEntity']= $dir . 'includes/CachedEntity.php'; $wgAutoloadClasses['Wikibase\ClientUtils'] = $dir . 'includes/ClientUtils.php'; $wgAutoloadClasses['Wikibase\EntityCacheUpdater'] = $dir . 'includes/EntityCacheUpdater.php'; +$wgAutoloadClasses['Wikibase\InterwikiSorter'] = $dir . 'includes/InterwikiSorter.php'; $wgAutoloadClasses['Wikibase\LangLinkHandler'] = $dir . 'includes/LangLinkHandler.php'; $wgAutoloadClasses['Wikibase\NoLangLinkHandler'] = $dir . 'includes/NoLangLinkHandler.php'; -$wgAutoloadClasses['Wikibase\SortUtils'] = $dir . 'includes/SortUtils.php'; $wgAutoloadClasses['Wikibase\ChangeHandler'] = $dir . 'includes/ChangeHandler.php'; $wgAutoloadClasses['Wikibase\NamespaceChecker']= $dir . 'includes/NamespaceChecker.php'; diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 5bfe604..c2da880 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -59,3 +59,97 @@ 'wikibase-property' = 'Property' ) ); + +/** + * @todo this is a bit wikimedia-specific and need to find a better place for this stuff, + * such as mediawiki-config or somewhere. + * + * alphabetic and alphabetic revised come from: + * http://meta.wikimedia.org/w/index.php?title=MediaWiki:Interwiki_config-sorting_order-native-languagename + * http://meta.wikimedia.org/w/index.php?title=MediaWiki:Interwiki_config-sorting_order-native-languagename-firstword (revised) + * and from pywikipedia for alphabetic_sr + */ +$wgWBClientSettings['interwikiSortOrders'] = array( +'alphabetic' = array( +'ace', 'kbd', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc', +'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bm', 'bn', 'bjn', +'zh-min-nan', 'nan', 'map-bms', 'ba', 'be', 'be-x-old', 'bh', 'bcl', 'bi', +'bg', 'bar', 'bo', 'bs', 'br', 'bxr', 'ca', 'cv', 'ceb', 'cs', 'ch', +'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 'dk', 'pdc', 'de', +'dv', 'nv', 'dsb', 'dz', 'mh', 'et', 'el', 'eml', 'en', 'myv', 'es', 'eo', +'ext', 'eu', 'ee', 'fa', 'hif', 'fo', 'fr', 'fy', 'ff', 'fur', 'ga', 'gv', +'gag', 'gd', 'gl', 'gan', 'ki', 'glk', 'gu', 'got', 'hak', 'xal', 'ko', 'ha', +'haw', 'hy', 'hi', 'ho', 'hsb', 'hr', 'io', 'ig', 'ilo', 'bpy', 'id', 'ia', +'ie', 'iu', 'ik', 'os', 'xh', 'zu', 'is', 'it', 'he', 'jv', 'kl', 'kn', 'kr', +'pam', 'krc', 'ka', 'ks', 'csb', 'kk', 'kw', 'rw', 'rn', 'sw', 'kv', 'kg', +'ht', 'ku', 'kj', 'ky', 'mrj', 'lad', 'lbe', 'lez', 'lo', 'ltg', 'la', 'lv', +'lb', 'lt', 'lij', 'li', 'ln', 'jbo', 'lg', 'lmo', 'hu', 'mk', 'mg', 'ml', +'mt', 'mi', 'mr', 'xmf', 'arz', 'mzn', 'ms', 'min', 'cdo', 'mwl', 'mdf', 'mo', +'mn', 'mus', 'my', 'nah', 'na', 'fj', 'nl', 'nds-nl', 'cr', 'ne', 'new', 'ja', +'nap', 'ce', 'frr', 'pih', 'no', 'nb', 'nn',
[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/52403 Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: I043f737909e1c778d811c88f746ee3d35b39e077 --- M Gemfile.lock 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/03/52403/1 diff --git a/Gemfile.lock b/Gemfile.lock index 233d22e..2ad52de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,14 +2,14 @@ remote: https://rubygems.org/ specs: builder (3.2.0) -childprocess (0.3.8) +childprocess (0.3.9) ffi (~ 1.0, = 1.0.11) chunky_png (1.2.7) -cucumber (1.2.1) +cucumber (1.2.2) builder (= 2.1.2) diff-lcs (= 1.1.3) - gherkin (~ 2.11.0) - json (= 1.4.6) + gherkin (~ 2.11.6) + multi_json (~ 1.3) data_magic (0.14) faker (= 1.1.2) yml_reader (= 0.2) @@ -23,9 +23,9 @@ json (1.7.7) multi_json (1.6.1) net-http-persistent (2.8) -page-object (0.8.5) - page_navigation (= 0.6) - selenium-webdriver (= 2.30.0) +page-object (0.8.6.1) + page_navigation (= 0.7) + selenium-webdriver (= 2.31.0) watir-webdriver (= 0.6.2) page_navigation (0.7) data_magic (= 0.14) @@ -36,7 +36,7 @@ rspec-expectations (2.13.0) diff-lcs (= 1.1.3, 2.0) rubyzip (0.9.9) -selenium-webdriver (2.30.0) +selenium-webdriver (2.31.0) childprocess (= 0.2.5) multi_json (~ 1.0) rubyzip -- To view, visit https://gerrit.wikimedia.org/r/52403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I043f737909e1c778d811c88f746ee3d35b39e077 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Americal spelling - authorize/initialize/normalize/recognize... - change (mediawiki...SecurePoll)
jenkins-bot has submitted this change and it was merged. Change subject: Americal spelling - authorize/initialize/normalize/recognize (messages/comments) + removing whitespace .. Americal spelling - authorize/initialize/normalize/recognize (messages/comments) + removing whitespace Change-Id: Ib75e3c8a22ad698e1f9d31d417ed3b51ef6205d5 --- M SecurePoll.i18n.php M SecurePoll.sql M cli/testDebian.php M cli/wm-scripts/dumpMetaTranslations.php M includes/ballots/Ballot.php M includes/entities/Election.php M includes/main/Store.php M includes/pages/Page.php M includes/pages/VotePage.php M includes/user/Auth.php M includes/user/Voter.php 11 files changed, 22 insertions(+), 22 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/SecurePoll.i18n.php b/SecurePoll.i18n.php index 3a3c40b..8a3984f 100644 --- a/SecurePoll.i18n.php +++ b/SecurePoll.i18n.php @@ -65,9 +65,9 @@ 'securepoll-invalid-score' = 'The score must be a number between $1 and $2.', 'securepoll-unanswered-options' = 'You must give a response for every question.', - # Authorisation related + # Authorization related 'securepoll-remote-auth-error' = 'Error fetching your account information from the server.', - 'securepoll-remote-parse-error' = 'Error interpreting the authorisation response from the server.', + 'securepoll-remote-parse-error' = 'Error interpreting the authorization response from the server.', 'securepoll-api-invalid-params' = 'Invalid parameters.', 'securepoll-api-no-user' = 'No user was found with the given ID.', @@ -79,7 +79,7 @@ 'securepoll-blocked-centrally' = 'Sorry, you cannot vote in this election as you are blocked on at least $1 {{PLURAL:$1|wiki|wikis}}.', 'securepoll-bot' = 'Sorry, accounts with the bot flag are not allowed to vote in this election.', 'securepoll-not-in-group' = 'Only members of the $1 group can vote in this election.', - 'securepoll-not-in-list' = 'Sorry, you are not in the predetermined list of users authorised to vote in this election.', + 'securepoll-not-in-list' = 'Sorry, you are not in the predetermined list of users authorized to vote in this election.', 'securepoll-custom-unqualified' = '$1', # List page diff --git a/SecurePoll.sql b/SecurePoll.sql index a198e8a..f87527a 100644 --- a/SecurePoll.sql +++ b/SecurePoll.sql @@ -68,7 +68,7 @@ -- End date, in 14-char MW format el_end_date varbinary(14), - -- User authorisation type, see Auth.php + -- User authorization type, see Auth.php el_auth_type varbinary(32) not null ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/spel_title ON /*_*/securepoll_elections (el_title); @@ -132,14 +132,14 @@ -- securepoll_voters.voter_id vote_voter int not null, - -- Denormalised fields from the user table for efficient sorting + -- Denormalized fields from the user table for efficient sorting -- securepoll_voters.voter_name vote_voter_name varchar(255) binary not null, -- securepoll_voters.voter_domain vote_voter_domain varbinary(32) not null, - -- Denormalised field from the strike table + -- Denormalized field from the strike table -- 1 if struck, 0 if not struck vote_struck tinyint not null, diff --git a/cli/testDebian.php b/cli/testDebian.php index e342b2c..f3e02de 100644 --- a/cli/testDebian.php +++ b/cli/testDebian.php @@ -50,7 +50,7 @@ } $line = trim( $line ); if ( !preg_match( '/^V: ([0-9-]*)$/', $line, $m ) ) { - echo Skipping unrecognised line $line\n; + echo Skipping unrecognized line $line\n; continue; } diff --git a/cli/wm-scripts/dumpMetaTranslations.php b/cli/wm-scripts/dumpMetaTranslations.php index 7f3fcfd..9dc68f9 100644 --- a/cli/wm-scripts/dumpMetaTranslations.php +++ b/cli/wm-scripts/dumpMetaTranslations.php @@ -173,7 +173,7 @@ continue; } - fwrite( STDERR, Unrecognised section \$sectionName\ in $lang\n ); + fwrite( STDERR, Unrecognized section \$sectionName\ in $lang\n ); } fwrite( STDERR, [[$titleText]]: found . $numMessages . messages\n ); diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php index a731564..f349a40 100644 --- a/includes/ballots/Ballot.php +++ b/includes/ballots/Ballot.php @@ -195,7 +195,7 @@ # Get voter from session $voter = $auth-getVoterFromSession( $this-election ); # If there's no session, try creating one. - # This will fail if the user is not authorised to vote in the election + # This will fail if the user is not
[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (mediawiki...MobileFrontend)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/52404 Change subject: Updated Ruby gems .. Updated Ruby gems Change-Id: Ib9b8da4bb380c9d96adb27f1c090cb30ce36c56b --- M tests/acceptance/Gemfile.lock 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/04/52404/1 diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock index 233d22e..2ad52de 100644 --- a/tests/acceptance/Gemfile.lock +++ b/tests/acceptance/Gemfile.lock @@ -2,14 +2,14 @@ remote: https://rubygems.org/ specs: builder (3.2.0) -childprocess (0.3.8) +childprocess (0.3.9) ffi (~ 1.0, = 1.0.11) chunky_png (1.2.7) -cucumber (1.2.1) +cucumber (1.2.2) builder (= 2.1.2) diff-lcs (= 1.1.3) - gherkin (~ 2.11.0) - json (= 1.4.6) + gherkin (~ 2.11.6) + multi_json (~ 1.3) data_magic (0.14) faker (= 1.1.2) yml_reader (= 0.2) @@ -23,9 +23,9 @@ json (1.7.7) multi_json (1.6.1) net-http-persistent (2.8) -page-object (0.8.5) - page_navigation (= 0.6) - selenium-webdriver (= 2.30.0) +page-object (0.8.6.1) + page_navigation (= 0.7) + selenium-webdriver (= 2.31.0) watir-webdriver (= 0.6.2) page_navigation (0.7) data_magic (= 0.14) @@ -36,7 +36,7 @@ rspec-expectations (2.13.0) diff-lcs (= 1.1.3, 2.0) rubyzip (0.9.9) -selenium-webdriver (2.30.0) +selenium-webdriver (2.31.0) childprocess (= 0.2.5) multi_json (~ 1.0) rubyzip -- To view, visit https://gerrit.wikimedia.org/r/52404 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9b8da4bb380c9d96adb27f1c090cb30ce36c56b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing position of colon for consistency - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Changing position of colon for consistency .. Changing position of colon for consistency Change-Id: I5f89c7aea9c7922a8351860af33a2b6f84476bb0 --- M includes/installer/Installer.i18n.php 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 0d910fd..85f94d8 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -93,9 +93,9 @@ However, MediaWiki requires PHP $2 or higher.', 'config-unicode-using-utf8' = 'Using Brion Vibber\'s utf8_normalize.so for Unicode normalization.', 'config-unicode-using-intl' = 'Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.', - 'config-unicode-pure-php-warning' = '''Warning''': The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation. + 'config-unicode-pure-php-warning' = '''Warning:''' The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation. If you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode normalization]., - 'config-unicode-update-warning' = '''Warning''': The installed version of the Unicode normalization wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library. + 'config-unicode-update-warning' = '''Warning:''' The installed version of the Unicode normalization wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library. You should [//www.mediawiki.org/wiki/Unicode_normalization_considerations upgrade] if you are at all concerned about using Unicode., 'config-no-db'= 'Could not find a suitable database driver! You need to install a database driver for PHP. The following database types are supported: $1. @@ -103,8 +103,8 @@ If you are on shared hosting, ask your hosting provider to install a suitable database driver. If you compiled PHP yourself, reconfigure it with a database client enabled, for example using code./configure --with-mysql/code. If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.', - 'config-outdated-sqlite' = '''Warning''': you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable., - 'config-no-fts3' = '''Warning''': SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend., + 'config-outdated-sqlite' = '''Warning:''' you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable., + 'config-no-fts3' = '''Warning:''' SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend., 'config-register-globals' = '''Warning: PHP's code[http://php.net/register_globals register_globals]/code option is enabled.''' '''Disable it if you can.''' MediaWiki will work, but your server is exposed to potential security vulnerabilities., @@ -127,19 +127,19 @@ If you're running Mandrake, install the php-xml package., 'config-pcre' = 'The PCRE support module appears to be missing. MediaWiki requires the Perl-compatible regular expression functions to work.', - 'config-pcre-no-utf8' = '''Fatal''': PHP's PCRE module seems to be compiled without PCRE_UTF8 support. + 'config-pcre-no-utf8' = '''Fatal:''' PHP's PCRE module seems to be compiled without PCRE_UTF8 support. MediaWiki requires UTF-8 support to function correctly., 'config-memory-raised'= PHP's codememory_limit/code is $1, raised to $2., 'config-memory-bad' = '''Warning:''' PHP's codememory_limit/code is $1. This is probably too low. The installation may fail!, - 'config-ctype'= '''Fatal''': PHP must be compiled with support for the [http://www.php.net/manual/en/ctype.installation.php Ctype extension]., + 'config-ctype'= '''Fatal:''' PHP must be compiled with support for the [http://www.php.net/manual/en/ctype.installation.php Ctype extension]., 'config-xcache' = '[http://xcache.lighttpd.net/ XCache] is installed', 'config-apc' = '[http://www.php.net/apc APC] is installed', 'config-wincache' =
[MediaWiki-commits] [Gerrit] Don't create empty files in AndroidXmlFFS - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Don't create empty files in AndroidXmlFFS .. Don't create empty files in AndroidXmlFFS Change-Id: I04d55daa07caf7bafe7bc5447406e3671e850e28 --- M ffs/AndroidXmlFFS.php 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php index 5ce7ada..15fac78 100644 --- a/ffs/AndroidXmlFFS.php +++ b/ffs/AndroidXmlFFS.php @@ -45,6 +45,11 @@ $writer = new SimpleXMLElement( $template ); $mangler = $this-group-getMangler(); + $collection-filter( 'hastranslation', false ); + if ( count( $collection ) === 0 ) { + return ''; + } + /** * @var $m TMessage */ @@ -52,9 +57,6 @@ $key = $mangler-unmangle( $key ); $value = $m-translation(); - if ( $value === null ) { - continue; - } $value = str_replace( TRANSLATE_FUZZY, '', $value ); // Kudos to the brilliant person who invented this braindead file format -- To view, visit https://gerrit.wikimedia.org/r/52379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04d55daa07caf7bafe7bc5447406e3671e850e28 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add fuzzy support to AndroidXmlFFS - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Add fuzzy support to AndroidXmlFFS .. Add fuzzy support to AndroidXmlFFS Change-Id: Ib841b315ec54a4a3f840ded6fe9c2b97ba0f18fc --- M ffs/AndroidXmlFFS.php M tests/ffs/AndroidXmlFFSTest.php 2 files changed, 17 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php index 0948228..5ce7ada 100644 --- a/ffs/AndroidXmlFFS.php +++ b/ffs/AndroidXmlFFS.php @@ -21,7 +21,13 @@ foreach ( $reader-string as $string ) { $key = (string)$string['name']; - $messages[$key] = stripcslashes( (string)$string ); + $value = stripcslashes( (string)$string ); + + if ( isset( $string['fuzzy'] ) (string)$string['fuzzy'] === 'true' ) { + $value = TRANSLATE_FUZZY . $value; + } + + $messages[$key] = $value; } return array( @@ -49,6 +55,7 @@ if ( $value === null ) { continue; } + $value = str_replace( TRANSLATE_FUZZY, '', $value ); // Kudos to the brilliant person who invented this braindead file format $string = $writer-addChild( 'string', addcslashes( $value, '\'' ) ); @@ -63,4 +70,8 @@ return $writer-asXml(); } + + public function supportsFuzzy() { + return 'yes'; + } } diff --git a/tests/ffs/AndroidXmlFFSTest.php b/tests/ffs/AndroidXmlFFSTest.php index a9aa3ad..851b397 100644 --- a/tests/ffs/AndroidXmlFFSTest.php +++ b/tests/ffs/AndroidXmlFFSTest.php @@ -30,7 +30,7 @@ ?xml version=1.0 encoding=utf-8? resources string name=wpt_voicerecVoice recording/string - string name=wpt_stillimagePicture/string + string name=wpt_stillimage fuzzy=truePicture/string /resources XML; @@ -42,7 +42,7 @@ $parsed = $ffs-readFromVariable( $file ); $expected = array( 'wpt_voicerec' = 'Voice recording', - 'wpt_stillimage' = 'Picture', + 'wpt_stillimage' = '!!FUZZY!!Picture', ); $expected = array( 'MESSAGES' = $expected, 'AUTHORS' = array() ); $this-assertEquals( $expected, $parsed ); @@ -57,7 +57,7 @@ $messages = array( 'ko=26ra' = 'wawe', - 'foobar' = 'Kissa kala koira a\'b', + 'foobar' = '!!FUZZY!!Kissa kala koira a\'b', ); $collection = new MockMessageCollection( $messages ); @@ -81,4 +81,6 @@ $this-messages['foobar']-addTag( 'fuzzy' ); } + + public function filter( $type, $condition = true, $value = null ) {} } -- To view, visit https://gerrit.wikimedia.org/r/52380 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib841b315ec54a4a3f840ded6fe9c2b97ba0f18fc Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename js file to match naming convention - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Rename js file to match naming convention .. Rename js file to match naming convention Change-Id: Ia37ed3152f6e01976429acc3f57cac4be09c8853 --- M Translate.php R resources/js/ext.translate.special.searchtranslations.js 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/Translate.php b/Translate.php index 15ecfd9..efe8327 100644 --- a/Translate.php +++ b/Translate.php @@ -452,7 +452,7 @@ ) + $resourcePaths; $wgResourceModules['ext.translate.special.searchtranslations'] = array( - 'scripts' = 'resources/js/ext.translate.search.js', + 'scripts' = 'resources/js/ext.translate.special.searchtranslations.js', 'styles' = 'resources/css/ext.translate.special.searchtranslations.css', 'dependencies' = array( 'ext.translate.editor' ), 'position' = 'top', diff --git a/resources/js/ext.translate.search.js b/resources/js/ext.translate.special.searchtranslations.js similarity index 100% rename from resources/js/ext.translate.search.js rename to resources/js/ext.translate.special.searchtranslations.js -- To view, visit https://gerrit.wikimedia.org/r/52372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia37ed3152f6e01976429acc3f57cac4be09c8853 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make whole facet row clickable on search - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Make whole facet row clickable on search .. Make whole facet row clickable on search Bug: 45554 Change-Id: Ib318f7046aa4ea4b84c45f4d0b86de52ffd7bd3e --- M resources/js/ext.translate.search.js 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.search.js b/resources/js/ext.translate.search.js index 9a40731..f954e4c 100644 --- a/resources/js/ext.translate.search.js +++ b/resources/js/ext.translate.search.js @@ -2,6 +2,11 @@ 'use strict'; $( document ).ready( function () { + // Make the whole rows clickable + $( '.facet-item' ).click( function () { + window.location = $( this ).find( 'a' ).attr( 'href' ); + } ); + $( '.tux-message' ).each( function () { var $this = $( this ); -- To view, visit https://gerrit.wikimedia.org/r/52371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib318f7046aa4ea4b84c45f4d0b86de52ffd7bd3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - initialize (messages/comments) - change (mediawiki...SemanticMediaWiki)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52405 Change subject: American spelling - initialize (messages/comments) .. American spelling - initialize (messages/comments) Change-Id: I818e6fab13340d8773cd682031f97e92937bdad9 --- M SemanticMediaWiki.hooks.php M includes/SMW_SemanticData.php M includes/Setup.php M includes/articlepages/SMW_OrderedListPage.php M includes/dataitems/SMW_DI_Bool.php M includes/dataitems/SMW_DI_Concept.php M includes/dataitems/SMW_DI_Number.php M includes/dataitems/SMW_DI_Property.php M includes/dataitems/SMW_DI_Time.php M includes/dataitems/SMW_DI_URI.php M includes/datavalues/SMW_DV_Concept.php M includes/datavalues/SMW_DV_Time.php M includes/datavalues/SMW_DataValue.php M includes/export/SMW_Exporter.php M includes/sparql/SMW_SparqlResultWrapper.php M includes/storage/SMW_QueryResult.php M includes/storage/SMW_RequestOptions.php M includes/storage/SMW_Store.php M includes/storage/SQLStore/SMW_SQLStore3.php M includes/storage/SQLStore/SMW_SQLStore3_SetupHandlers.php M languages/SMW_Messages.php M specials/AskSpecial/SMW_QueryUI.php 22 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/05/52405/1 diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 1a6315a..87eaf90 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -115,7 +115,7 @@ /** * This hook registers parser functions and hooks to the given parser. It is -* called during SMW initialisation. Note that parser hooks are something different +* called during SMW initialization. Note that parser hooks are something different * than MW hooks in general, which explains the two-level registration. * * @since 1.7 diff --git a/includes/SMW_SemanticData.php b/includes/SMW_SemanticData.php index 132c51f..facf4df 100644 --- a/includes/SMW_SemanticData.php +++ b/includes/SMW_SemanticData.php @@ -139,7 +139,7 @@ * unserialisation. This is a little safer than serialising nothing: * if, for any reason, SMW should ever access an unserialised parser * output, then the Semdata container will at least look as if properly -* initialised (though empty). +* initialized (though empty). * * @return array */ diff --git a/includes/Setup.php b/includes/Setup.php index d9410f0..6f067f2 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -438,9 +438,9 @@ /**/ /** - * Initialise a global language object for content language. This must happen + * Initialize a global language object for content language. This must happen * early on, even before user language is known, to determine labels for - * additional namespaces. In contrast, messages can be initialised much later + * additional namespaces. In contrast, messages can be initialized much later * when they are actually needed. */ function smwfInitContentLanguage( $langcode ) { diff --git a/includes/articlepages/SMW_OrderedListPage.php b/includes/articlepages/SMW_OrderedListPage.php index 789a7a3..48312a0 100644 --- a/includes/articlepages/SMW_OrderedListPage.php +++ b/includes/articlepages/SMW_OrderedListPage.php @@ -88,7 +88,7 @@ } /** -* Initialise some parameters that might be changed by subclasses +* Initialize some parameters that might be changed by subclasses * (e.g. $limit). Method can be overwritten in this case. * If the method returns false, nothing will be printed besides * the original article. diff --git a/includes/dataitems/SMW_DI_Bool.php b/includes/dataitems/SMW_DI_Bool.php index db21d68..12126c9 100644 --- a/includes/dataitems/SMW_DI_Bool.php +++ b/includes/dataitems/SMW_DI_Bool.php @@ -22,7 +22,7 @@ public function __construct( $boolean ) { if ( !is_bool( $boolean ) ) { - throw new SMWDataItemException( Initialisation value '$boolean' is not a boolean. ); + throw new SMWDataItemException( Initialization value '$boolean' is not a boolean. ); } $this-m_boolean = ( $boolean == true ); diff --git a/includes/dataitems/SMW_DI_Concept.php b/includes/dataitems/SMW_DI_Concept.php index e728ee6..7b117c2 100644 --- a/includes/dataitems/SMW_DI_Concept.php +++ b/includes/dataitems/SMW_DI_Concept.php @@ -45,7 +45,7 @@ protected $m_depth; /** -* Initialise the concept data. +* Initialize the concept data. * @param $concept the concept query string * @param $docu string with user documentation * @param $queryefeatures integer flags about query features diff --git a/includes/dataitems/SMW_DI_Number.php
[MediaWiki-commits] [Gerrit] Copyright notice on editing will use Wikidata license text i... - change (mediawiki...Wikibase)
Denny Vrandecic has uploaded a new change for review. https://gerrit.wikimedia.org/r/52406 Change subject: Copyright notice on editing will use Wikidata license text if available .. Copyright notice on editing will use Wikidata license text if available Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 --- M repo/includes/EntityView.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/06/52406/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1efb24e..c72a33e 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -719,6 +719,12 @@ [$wgRightsUrl $wgRightsText] )-parse(); + // if this is a wiki using the WikimediaMessages extension (i.e. Wikidata) it will use the + // shortcopyrightwarning message from that extension instead. + if ( $this-msg( 'wikidata-shortcopyrightwarning' )-exists() ) { + $rightsWarning = $this-msg( 'wikidata-shortcopyrightwarning' )-parse(); + } + // copyright warning message $out-addJsConfigVars( 'wbCopyrightWarning', $rightsWarning ); -- To view, visit https://gerrit.wikimedia.org/r/52406 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Denny Vrandecic denny.vrande...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing path to $.eachchange qunit tests - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Fixing path to $.eachchange qunit tests .. Fixing path to $.eachchange qunit tests Change-Id: I0a7cbff2ce57cc07cbf5e4c09c02389d38494b92 --- M DataTypes/DataTypes.mw.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/DataTypes/DataTypes.mw.php b/DataTypes/DataTypes.mw.php index eedba52..8dc800c 100644 --- a/DataTypes/DataTypes.mw.php +++ b/DataTypes/DataTypes.mw.php @@ -121,7 +121,7 @@ $testModules['qunit']['dataTypes.jquery.eachchange.tests'] = $moduleTemplate + array( 'scripts' = array( - 'tests/qunit/jquery.eachchange.tests.js', + 'tests/qunit/jquery/jquery.eachchange.tests.js', ), 'dependencies' = array( 'jquery.eachchange', -- To view, visit https://gerrit.wikimedia.org/r/51657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a7cbff2ce57cc07cbf5e4c09c02389d38494b92 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] $.eachchange: Allow attaching plugin to every input type - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: $.eachchange: Allow attaching plugin to every input type .. $.eachchange: Allow attaching plugin to every input type There is no great sense in filtering by the type attribute since the input element may have no type attribute at all (defaulting to text) or some HTML 5 type attribute. Change-Id: Ia67b5aea6886bba460dff7535e2306234201624c --- M DataTypes/resources/jquery/jquery.eachchange.js M DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js 2 files changed, 28 insertions(+), 1 deletion(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/DataTypes/resources/jquery/jquery.eachchange.js b/DataTypes/resources/jquery/jquery.eachchange.js index d957c5d..ecdbd2b 100644 --- a/DataTypes/resources/jquery/jquery.eachchange.js +++ b/DataTypes/resources/jquery/jquery.eachchange.js @@ -59,7 +59,7 @@ }; // works for text input fields and textarea only: - this.filter( 'input:text, textarea' ).each( function() { + this.filter( 'input, textarea' ).each( function() { var input = $( this ); monitorEachChange( input ); diff --git a/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js b/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js index c9c3909..570ef9d 100644 --- a/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js +++ b/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js @@ -37,6 +37,33 @@ } } ) ); + QUnit.test( + 'Initialization', + function( assert ) { + var $input = $( 'input/', { 'class': 'test_eachchange', type: 'text' } ), + $inputNoType = $( 'input/', { 'class': 'test_eachchange' } ), + $textarea = $( 'textarea/', { 'class': 'test_eachchange' } ); + + assert.equal( + $input.eachchange( iIncr ), + $input, + 'Initialized eachchange on a text input element.' + ); + + assert.equal( + $inputNoType.eachchange( iIncr ), + $inputNoType, + 'Initialized eachchange on an input element that has no type attribute.' + ); + + assert.equal( + $textarea.eachchange( iIncr ), + $textarea, + 'Initialized eachchange on a textarea.' + ); + } + ); + QUnit.test( 'jQuery.eachchange() basics', function( assert ) { var subject = $( 'input/', { 'class': 'test_eachchange', -- To view, visit https://gerrit.wikimedia.org/r/51658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia67b5aea6886bba460dff7535e2306234201624c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - familiarize/minimize - change (mediawiki...Translate)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52407 Change subject: American spelling - familiarize/minimize .. American spelling - familiarize/minimize Change-Id: I4721e9d224b589deb1b88739e8f99e3b63e8280f --- M PageTranslation.i18n.php M TranslateGroupDescriptions.i18n.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/07/52407/1 diff --git a/PageTranslation.i18n.php b/PageTranslation.i18n.php index 468c450..87c9de6 100644 --- a/PageTranslation.i18n.php +++ b/PageTranslation.i18n.php @@ -45,7 +45,7 @@ The page can now be span class=plainlinks[$3 translated]/span.', 'tpt-badsect' = '$1 is not a valid name for translation unit $2.', 'tpt-showpage-intro' = 'Below new, existing and deleted translation units are listed. -Before marking this version for translation, check that the changes to translation units are minimised to avoid unnecessary work for translators.', +Before marking this version for translation, check that the changes to translation units are minimized to avoid unnecessary work for translators.', 'tpt-mark-summary' = 'Marked this version for translation', 'tpt-edit-failed' = 'Could not update the page: $1', 'tpt-duplicate' = 'Translation unit name $1 is used more than once.', diff --git a/TranslateGroupDescriptions.i18n.php b/TranslateGroupDescriptions.i18n.php index fe3c7c0..b14765c 100644 --- a/TranslateGroupDescriptions.i18n.php +++ b/TranslateGroupDescriptions.i18n.php @@ -26,7 +26,7 @@ 'translate-group-desc-flaggedrevs' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:FlaggedRevs FlaggedRevs]', 'translate-group-desc-readerfeedback' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:ReaderFeedback ReaderFeedback]', 'translate-group-desc-semantic' = 'Meta message group containing all messages for all [http://semantic-mediawiki.org/ Semantic MediaWiki] extensions', - 'translate-group-desc-translate' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:Translate Translate]; please familiarise yourself with its [//www.mediawiki.org/wiki/Help:Extension:Translate/Glossary glossary]', + 'translate-group-desc-translate' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:Translate Translate]; please familiarize yourself with its [//www.mediawiki.org/wiki/Help:Extension:Translate/Glossary glossary]', 'translate-group-desc-wikiaextensions' = 'Meta message group containing all messages for supported MediaWiki extensions used by [http://www.wikia.com Wikia]', 'translate-group-desc-wikimediaextensions' = 'Meta message group containing all messages for supported MediaWiki extensions used by the [http://wikimedia.org/ Wikimedia Foundation]', 'translate-group-desc-wikimediaextensions-main' = 'Meta message group containing all messages for supported MediaWiki extensions required to be translated for the Wikimedia [http://meta.wikimedia.org/wiki/Language_committee Language committee]', -- To view, visit https://gerrit.wikimedia.org/r/52407 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4721e9d224b589deb1b88739e8f99e3b63e8280f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Copyright notice on editing will use Wikidata license text i... - change (mediawiki...Wikibase)
John Erling Blad has submitted this change and it was merged. Change subject: Copyright notice on editing will use Wikidata license text if available .. Copyright notice on editing will use Wikidata license text if available Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 --- M repo/includes/EntityView.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: John Erling Blad: Verified; Looks good to me, approved diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1efb24e..d57735b 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -713,11 +713,17 @@ // entity specific data $out-addJsConfigVars( 'wbEntityId', $entity-getPrefixedId() ); - $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', - $this-msg( 'wikibase-save' )-inContentLanguage()-text(), - $this-msg( 'copyrightpage' )-inContentLanguage()-text(), - [$wgRightsUrl $wgRightsText] - )-parse(); + if ( $this-msg( 'wikidata-shortcopyrightwarning' )-exists() ) { + // if this is a wiki using the WikimediaMessages extension (i.e. Wikidata) it will use the + // shortcopyrightwarning message from that extension instead. + $rightsWarning = $this-msg( 'wikidata-shortcopyrightwarning' )-parse(); + } else { + $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', + $this-msg( 'wikibase-save' )-inContentLanguage()-text(), + $this-msg( 'copyrightpage' )-inContentLanguage()-text(), + [$wgRightsUrl $wgRightsText] + )-parse(); + } // copyright warning message $out-addJsConfigVars( 'wbCopyrightWarning', $rightsWarning ); -- To view, visit https://gerrit.wikimedia.org/r/52406 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 45689) [TUX] Add tooltip to expand and close icons - change (mediawiki...Translate)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/52408 Change subject: (Bug 45689) [TUX] Add tooltip to expand and close icons .. (Bug 45689) [TUX] Add tooltip to expand and close icons Change-Id: Ibbd6e2b58c58a6a1ed46aaf1e8f1a685c89d51fc --- M Translate.i18n.php M Translate.php M resources/js/ext.translate.editor.js 3 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/08/52408/1 diff --git a/Translate.i18n.php b/Translate.i18n.php index 6bb758c..af21da6 100644 --- a/Translate.i18n.php +++ b/Translate.i18n.php @@ -492,6 +492,8 @@ 'tux-empty-list-other-guide' = 'You can help reviewing existing translations', 'tux-empty-list-other-action' = 'Proofread translations', 'tux-empty-list-other-link' = 'Show all messages', + 'tux-editor-close-tooltip' = 'Close', + 'tux-editor-expand-tooltip' = 'Expand', ); @@ -1016,6 +1018,8 @@ 'tux-empty-list-other-action' = '{{Tuxspec|7}} This is a action button.', 'tux-empty-list-other-link' = '{{Tuxspec|7}} This is a link to change message filter. {{Identical|Show all messages}}', + 'tux-editor-close-tooltip' = 'Tooltip for close icon of translate editor', + 'tux-editor-expand-tooltip' = 'Tooltip for expand icon of translate editor', ); /** Afrikaans (Afrikaans) diff --git a/Translate.php b/Translate.php index efe8327..72fc479 100644 --- a/Translate.php +++ b/Translate.php @@ -289,6 +289,8 @@ 'translate-edit-askpermission', 'tux-editor-outdated-warning', 'tux-editor-outdated-warning-diff-link', + 'tux-editor-close-tooltip', + 'tux-editor-expand-tooltip', ), 'position' = 'top', ) + $resourcePaths; diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 7a84d3f..62d4fa3 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -227,6 +227,7 @@ $closeIcon = $( 'span' ) .addClass( 'one column close' ) + .attr( 'title', mw.msg( 'tux-editor-close-tooltip' ) ) .on( 'click', function () { translateEditor.hide(); } ); @@ -235,6 +236,7 @@ // Initially the editor column is contracted, // so show the expand button first .addClass( 'one column editor-info-toggle editor-expand' ) + .attr( 'title', mw.msg( 'tux-editor-expand-tooltip' ) ) .on( 'click', function () { translateEditor.infoToggle( $( this ) ); } ); -- To view, visit https://gerrit.wikimedia.org/r/52408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbd6e2b58c58a6a1ed46aaf1e8f1a685c89d51fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Copyright notice on editing will use Wikidata license text i... - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/52409 Change subject: Copyright notice on editing will use Wikidata license text if available .. Copyright notice on editing will use Wikidata license text if available Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 --- M repo/includes/EntityView.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/09/52409/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1efb24e..d57735b 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -713,11 +713,17 @@ // entity specific data $out-addJsConfigVars( 'wbEntityId', $entity-getPrefixedId() ); - $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', - $this-msg( 'wikibase-save' )-inContentLanguage()-text(), - $this-msg( 'copyrightpage' )-inContentLanguage()-text(), - [$wgRightsUrl $wgRightsText] - )-parse(); + if ( $this-msg( 'wikidata-shortcopyrightwarning' )-exists() ) { + // if this is a wiki using the WikimediaMessages extension (i.e. Wikidata) it will use the + // shortcopyrightwarning message from that extension instead. + $rightsWarning = $this-msg( 'wikidata-shortcopyrightwarning' )-parse(); + } else { + $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', + $this-msg( 'wikibase-save' )-inContentLanguage()-text(), + $this-msg( 'copyrightpage' )-inContentLanguage()-text(), + [$wgRightsUrl $wgRightsText] + )-parse(); + } // copyright warning message $out-addJsConfigVars( 'wbCopyrightWarning', $rightsWarning ); -- To view, visit https://gerrit.wikimedia.org/r/52409 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45769) make string datatype non-experimental - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: (bug 45769) make string datatype non-experimental .. (bug 45769) make string datatype non-experimental Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 --- M lib/config/WikibaseLib.default.php M lib/config/WikibaseLib.experimental.php 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/lib/config/WikibaseLib.default.php b/lib/config/WikibaseLib.default.php index aeb4d48..c3a8bfd 100644 --- a/lib/config/WikibaseLib.default.php +++ b/lib/config/WikibaseLib.default.php @@ -93,4 +93,5 @@ $wgWBSettings['dataTypes'] = array( 'wikibase-item', 'commonsMedia', + 'string', ); diff --git a/lib/config/WikibaseLib.experimental.php b/lib/config/WikibaseLib.experimental.php index 0bb6ed7..3ea4f7e 100644 --- a/lib/config/WikibaseLib.experimental.php +++ b/lib/config/WikibaseLib.experimental.php @@ -41,7 +41,6 @@ 'monolingual-text', 'multilingual-text', 'time', - 'string', ) ); $wgAutoloadClasses['Wikibase\Query'] = __DIR__ . '/../includes/query/Query.php'; -- To view, visit https://gerrit.wikimedia.org/r/52389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic82a137e31c37bc05b8b0c2476472238bd5d35f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Copyright notice on editing will use Wikidata license text i... - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Copyright notice on editing will use Wikidata license text if available .. Copyright notice on editing will use Wikidata license text if available Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 --- M repo/includes/EntityView.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1efb24e..d57735b 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -713,11 +713,17 @@ // entity specific data $out-addJsConfigVars( 'wbEntityId', $entity-getPrefixedId() ); - $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', - $this-msg( 'wikibase-save' )-inContentLanguage()-text(), - $this-msg( 'copyrightpage' )-inContentLanguage()-text(), - [$wgRightsUrl $wgRightsText] - )-parse(); + if ( $this-msg( 'wikidata-shortcopyrightwarning' )-exists() ) { + // if this is a wiki using the WikimediaMessages extension (i.e. Wikidata) it will use the + // shortcopyrightwarning message from that extension instead. + $rightsWarning = $this-msg( 'wikidata-shortcopyrightwarning' )-parse(); + } else { + $rightsWarning = $this-msg( 'wikibase-shortcopyrightwarning', + $this-msg( 'wikibase-save' )-inContentLanguage()-text(), + $this-msg( 'copyrightpage' )-inContentLanguage()-text(), + [$wgRightsUrl $wgRightsText] + )-parse(); + } // copyright warning message $out-addJsConfigVars( 'wbCopyrightWarning', $rightsWarning ); -- To view, visit https://gerrit.wikimedia.org/r/52409 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7dba1130202c3c1d7dd12fc50d7ee65059d99b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for references counter behavior - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/52410 Change subject: Fix for references counter behavior .. Fix for references counter behavior References counter did not react when a reference was removed or adding a new reference was canceled. Change-Id: Ibd776629a1a5189315e7846059e7bf55acf93e93 --- M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/10/52410/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index d58b4ff..eea643d 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -232,11 +232,12 @@ // destroy widget representing the list item's value and remove node from list: this._lia.liInstance( $itemNode ).destroy(); - // Trigger itemremoved event before removing the DOM node to be able to query for its - // context. - this._trigger( 'itemremoved', null, [ value, $itemNode ] ); - $itemNode.remove(); + + // For correctly counting the listview items (e.g. for the references), the + // itemremoved event has to be triggered after the item node got removed to not count + // a pending list item that is about to be removed. + this._trigger( 'itemremoved', null, [ value, $itemNode ] ); } } ), diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index 303b0c7..8bd0039 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -89,7 +89,7 @@ value: refs, showAddButton: mw.msg( 'wikibase-addreference' ) } ) - .on( 'listviewitemadded listitemremoved', function( e, value, $li ) { + .on( 'listviewitemadded listviewitemremoved', function( e, value, $li ) { self.drawReferencesCounter(); } ) .on( 'listviewenternewitem', function( event, $newLi ) { -- To view, visit https://gerrit.wikimedia.org/r/52410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd776629a1a5189315e7846059e7bf55acf93e93 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 44765) Add user-select:none to wb-u-toolbar and -group - change (mediawiki...Wikibase)
Henning Snater has submitted this change and it was merged. Change subject: (Bug 44765) Add user-select:none to wb-u-toolbar and -group .. (Bug 44765) Add user-select:none to wb-u-toolbar and -group This makes the toolbar text unselectable and it will not be copied in cut-n-paste operations. Note that this doesn't work quite this way in all browsers. Change-Id: I61b8d49bd60d333768072e5d0abfed04a99715b3 --- M lib/resources/wikibase.ui.Toolbar.css 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Henning Snater: Verified; Looks good to me, approved diff --git a/lib/resources/wikibase.ui.Toolbar.css b/lib/resources/wikibase.ui.Toolbar.css index 7c10b6e..c2ccdec 100644 --- a/lib/resources/wikibase.ui.Toolbar.css +++ b/lib/resources/wikibase.ui.Toolbar.css @@ -13,6 +13,10 @@ .wb-ui-toolbar, .wb-ui-toolbar-group { display: inline-block; white-space: nowrap; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; } .wb-ui-toolbar-label, -- To view, visit https://gerrit.wikimedia.org/r/49020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61b8d49bd60d333768072e5d0abfed04a99715b3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: John Erling Blad john.b...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 44955) Show new feedback in Recent Changes - change (mediawiki...ArticleFeedbackv5)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/52411 Change subject: (bug 44955) Show new feedback in Recent Changes .. (bug 44955) Show new feedback in Recent Changes Change-Id: Ie77912450e47b40d6f9947b2d14cebd67362 --- M ArticleFeedbackv5.activity.php M ArticleFeedbackv5.flagging.php M ArticleFeedbackv5.i18n.php M ArticleFeedbackv5.log.php M ArticleFeedbackv5.php M api/ApiArticleFeedbackv5.php 6 files changed, 82 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/11/52411/1 diff --git a/ArticleFeedbackv5.activity.php b/ArticleFeedbackv5.activity.php index 7260bc1..345c378 100644 --- a/ArticleFeedbackv5.activity.php +++ b/ArticleFeedbackv5.activity.php @@ -122,6 +122,28 @@ ); /** +* Adds an activity item to the global log under the articlefeedbackv5 +* +* @param string $type The type of activity we'll be logging +* @param int $pageId The id of the page so we can look it up +* @param int $itemId The id of the feedback item, used to build permalinks +* @param string $notes Any notes that were stored with the activity +* @param User $doer User who did the action +* @param array $params Array of parameters that can be passed into the msg thing - used for perpetrator for log entry +* @return int The id of the newly inserted log entry +*/ + public static function log( $type, $pageId, $itemId, $notes, $doer, array $params = array() ) { + $logId = ArticleFeedbackv5Log::log( $type, $pageId, $itemId, $notes, $doer, $params ); + + if ( $logId !== null ) { + // update log count in cache + static::incrementActivityCount( $itemId, $type ); + } + + return $logId; + } + + /** * Gets the last $limit of activity rows taken from the log table, * starting from point $continue, sorted by time - latest first * diff --git a/ArticleFeedbackv5.flagging.php b/ArticleFeedbackv5.flagging.php index d4440f1..f31f4a7 100644 --- a/ArticleFeedbackv5.flagging.php +++ b/ArticleFeedbackv5.flagging.php @@ -168,7 +168,7 @@ } $this-feedback-aft_oversight = 1; - $this-logId = ArticleFeedbackv5Log::logActivity( __FUNCTION__, $this-feedback-aft_page, $this-feedback-aft_id, $notes, $this-user, array( 'source' = $this-source ) ); + $this-logId = ArticleFeedbackv5Activity::log( __FUNCTION__, $this-feedback-aft_page, $this-feedback-aft_id, $notes, $this-user, array( 'source' = $this-source ) ); // autohide if not yet hidden if ( !$this-feedback-isHidden() ) { @@ -178,7 +178,7 @@ */ $this-feedback-aft_hide = 1; $this-feedback-aft_autohide = 1; - ArticleFeedbackv5Log::logActivity( 'autohide', $this-feedback-aft_page, $this-feedback-aft_id, 'Automatic hide', $this-user, array( 'source' = $this-source ) ); + ArticleFeedbackv5Activity::log( 'autohide', $this-feedback-aft_page, $this-feedback-aft_id, 'Automatic hide', $this-user, array( 'source' = $this-source ) ); } return true; @@ -203,13 +203,13 @@ $this-feedback-aft_oversight = 0; $this-feedback-aft_request = 0; - $this-logId = ArticleFeedbackv5Log::logActivity( __FUNCTION__, $this-feedback-aft_page, $this-feedback-aft_id, $notes, $this-user, array( 'source' = $this-source ) ); + $this-logId = ArticleFeedbackv5Activity::log( __FUNCTION__, $this-feedback-aft_page, $this-feedback-aft_id, $notes, $this-user, array( 'source' = $this-source ) ); // un-hide if autohidden if ( $this-feedback-aft_hide $this-feedback-aft_autohide ) { $this-feedback-aft_autohide = 0; $this-feedback-aft_hide = 0; - ArticleFeedbackv5Log::logActivity( 'unhide', $this-feedback-aft_page, $this-feedback-aft_id, 'Automatic un-hide', $this-user, array( 'source' = $this-source ) ); + ArticleFeedbackv5Activity::log( 'unhide', $this-feedback-aft_page, $this-feedback-aft_id, 'Automatic un-hide', $this-user, array( 'source' = $this-source ) ); } return true; @@ -234,7 +234,7 @@ $this-feedback-aft_request = 1; $this-feedback-aft_decline = 0; - $this-logId = ArticleFeedbackv5Log::logActivity( __FUNCTION__, $this-feedback-aft_page, $this-feedback-aft_id, $notes, $this-user, array( 'source' = $this-source ) ); + $this-logId = ArticleFeedbackv5Activity::log(
[MediaWiki-commits] [Gerrit] (Bug 45739) Pre-fetch information for the first element of t... - change (mediawiki...Translate)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/52412 Change subject: (Bug 45739) Pre-fetch information for the first element of the message list .. (Bug 45739) Pre-fetch information for the first element of the message list Change-Id: I828e52196bb214f713e59b70c27a97aa99ba28ad --- M resources/js/ext.translate.messagetable.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/12/52412/1 diff --git a/resources/js/ext.translate.messagetable.js b/resources/js/ext.translate.messagetable.js index 341dc0a..c445b13 100644 --- a/resources/js/ext.translate.messagetable.js +++ b/resources/js/ext.translate.messagetable.js @@ -372,6 +372,9 @@ message.group = messagegroup; messageTable.add( message ); messageTable.messages.push( message ); + if ( index === 0 ) { + $( '.tux-message:first' ).data( 'translateeditor' ).init(); + } } ); if ( result['query-continue'] === undefined ) { -- To view, visit https://gerrit.wikimedia.org/r/52412 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I828e52196bb214f713e59b70c27a97aa99ba28ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing param for LangLinkHandler - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/52413 Change subject: Add missing param for LangLinkHandler .. Add missing param for LangLinkHandler Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 --- M client/includes/NoLangLinkHandler.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/13/52413/1 diff --git a/client/includes/NoLangLinkHandler.php b/client/includes/NoLangLinkHandler.php index 437cb37..676b960 100644 --- a/client/includes/NoLangLinkHandler.php +++ b/client/includes/NoLangLinkHandler.php @@ -46,6 +46,7 @@ $langLinkHandler = new LangLinkHandler( Settings::get( 'siteGlobalID' ), Settings::get( 'namespaces' ), + Settings::get( 'excludeNamespaces' ), ClientStoreFactory::getStore()-newSiteLinkTable(), \Sites::singleton() ); -- To view, visit https://gerrit.wikimedia.org/r/52413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] British spelling - localise (for consistency) - change (mediawiki...CentralNotice)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52414 Change subject: British spelling - localise (for consistency) .. British spelling - localise (for consistency) Change-Id: I7b482ca043bd3e7948d8953c78575f7155335054 --- M CentralNotice.i18n.php M CentralNotice.php M CentralNoticePageLogPager.php 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/14/52414/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index e19501f..f93c6f6 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -110,7 +110,7 @@ 'centralnotice-number-uses' = 'Uses', 'centralnotice-settings' = 'Settings', 'centralnotice-edit-template' = 'Edit banner', - 'centralnotice-edit-template-summary' = 'To create a localizable message, enclose a hyphenated string in three curly brackets, e.g. {{{jimbo-quote}}}.', + 'centralnotice-edit-template-summary' = 'To create a localisable message, enclose a hyphenated string in three curly brackets, e.g. {{{jimbo-quote}}}.', 'centralnotice-message' = 'Message', 'centralnotice-message-not-set' = 'Message not set', 'centralnotice-clone' = 'Clone', diff --git a/CentralNotice.php b/CentralNotice.php index 4a7fb5e..d63a053 100644 --- a/CentralNotice.php +++ b/CentralNotice.php @@ -77,7 +77,7 @@ // $wgNoticeLang and $wgNoticeProject are used for targeting campaigns to specific wikis. These // should be overridden on each wiki with the appropriate values. -// Actual user language (wgUserLanguage) is used for banner localization. +// Actual user language (wgUserLanguage) is used for banner localisation. $wgNoticeLang = $wgLanguageCode; $wgNoticeProject = 'wikipedia'; @@ -532,8 +532,8 @@ $wgCentralBannerRecorder, $wgNoticeNumberOfBuckets, $wgNoticeBucketExpiry, $wgNoticeNumberOfControllerBuckets, $wgNoticeCookieShortExpiry, $wgScript; - // Making these calls too soon will causes issues with the namespace localization cache. This seems - // to be just right. We require them at all because MW will 302 page requests made to non localized + // Making these calls too soon will causes issues with the namespace localisation cache. This seems + // to be just right. We require them at all because MW will 302 page requests made to non localised // namespaces which results in wasteful extra calls. if ( !$wgCentralBannerDispatcher ) { $wgCentralBannerDispatcher = {$wgScript}/{$wgContLang-specialPage( 'BannerRandom' )}; diff --git a/CentralNoticePageLogPager.php b/CentralNoticePageLogPager.php index 05313fc..7d709d1 100644 --- a/CentralNoticePageLogPager.php +++ b/CentralNoticePageLogPager.php @@ -110,7 +110,7 @@ 'oldid' = $row-rc_last_oldid ); $diffUrl = htmlspecialchars( $title-getLinkUrl( $querydiff ) ); - // Should diff be localized? It appears not to be elsewhere in the interface. + // Should diff be localised? It appears not to be elsewhere in the interface. // See ChangesList-preCacheMessages() for example. $bannerCell = $bannerLink . nbsp;(a href=\$diffUrl\diff/a); } @@ -131,7 +131,7 @@ 'oldid' = $row-rc_last_oldid ); $diffUrl = htmlspecialchars( $title-getLinkUrl( $querydiff ) ); - // Should diff be localized? It appears not to be elsewhere in the interface. + // Should diff be localised? It appears not to be elsewhere in the interface. // See ChangesList-preCacheMessages() for example. $messageCell = $messageLink . nbsp;(a href=\$diffUrl\diff/a); } -- To view, visit https://gerrit.wikimedia.org/r/52414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b482ca043bd3e7948d8953c78575f7155335054 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing param for LangLinkHandler - change (mediawiki...Wikibase)
Denny Vrandecic has submitted this change and it was merged. Change subject: Add missing param for LangLinkHandler .. Add missing param for LangLinkHandler Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 --- M client/includes/NoLangLinkHandler.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Denny Vrandecic: Verified; Looks good to me, approved diff --git a/client/includes/NoLangLinkHandler.php b/client/includes/NoLangLinkHandler.php index 437cb37..676b960 100644 --- a/client/includes/NoLangLinkHandler.php +++ b/client/includes/NoLangLinkHandler.php @@ -46,6 +46,7 @@ $langLinkHandler = new LangLinkHandler( Settings::get( 'siteGlobalID' ), Settings::get( 'namespaces' ), + Settings::get( 'excludeNamespaces' ), ClientStoreFactory::getStore()-newSiteLinkTable(), \Sites::singleton() ); -- To view, visit https://gerrit.wikimedia.org/r/52413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing param for LangLinkHandler - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/52415 Change subject: Add missing param for LangLinkHandler .. Add missing param for LangLinkHandler Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 --- M client/includes/NoLangLinkHandler.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/52415/1 diff --git a/client/includes/NoLangLinkHandler.php b/client/includes/NoLangLinkHandler.php index 7c87f84..a26aa7f 100644 --- a/client/includes/NoLangLinkHandler.php +++ b/client/includes/NoLangLinkHandler.php @@ -74,6 +74,7 @@ $langLinkHandler = new LangLinkHandler( Settings::get( 'siteGlobalID' ), Settings::get( 'namespaces' ), + Settings::get( 'excludeNamespaces' ), ClientStoreFactory::getStore()-newSiteLinkTable(), \Sites::singleton() ); -- To view, visit https://gerrit.wikimedia.org/r/52415 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing param for LangLinkHandler - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: Add missing param for LangLinkHandler .. Add missing param for LangLinkHandler Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 --- M client/includes/NoLangLinkHandler.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Aude: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/client/includes/NoLangLinkHandler.php b/client/includes/NoLangLinkHandler.php index 7c87f84..a26aa7f 100644 --- a/client/includes/NoLangLinkHandler.php +++ b/client/includes/NoLangLinkHandler.php @@ -74,6 +74,7 @@ $langLinkHandler = new LangLinkHandler( Settings::get( 'siteGlobalID' ), Settings::get( 'namespaces' ), + Settings::get( 'excludeNamespaces' ), ClientStoreFactory::getStore()-newSiteLinkTable(), \Sites::singleton() ); -- To view, visit https://gerrit.wikimedia.org/r/52415 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bd30383404d599e4e0a6f6527274cabe00b3a53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.21-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for references counter behavior - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Fix for references counter behavior .. Fix for references counter behavior References counter did not react when a reference was removed or adding a new reference was canceled. Change-Id: Ibd776629a1a5189315e7846059e7bf55acf93e93 --- M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 2 files changed, 6 insertions(+), 5 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js index d58b4ff..eea643d 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js @@ -232,11 +232,12 @@ // destroy widget representing the list item's value and remove node from list: this._lia.liInstance( $itemNode ).destroy(); - // Trigger itemremoved event before removing the DOM node to be able to query for its - // context. - this._trigger( 'itemremoved', null, [ value, $itemNode ] ); - $itemNode.remove(); + + // For correctly counting the listview items (e.g. for the references), the + // itemremoved event has to be triggered after the item node got removed to not count + // a pending list item that is about to be removed. + this._trigger( 'itemremoved', null, [ value, $itemNode ] ); } } ), diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index 303b0c7..8bd0039 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -89,7 +89,7 @@ value: refs, showAddButton: mw.msg( 'wikibase-addreference' ) } ) - .on( 'listviewitemadded listitemremoved', function( e, value, $li ) { + .on( 'listviewitemadded listviewitemremoved', function( e, value, $li ) { self.drawReferencesCounter(); } ) .on( 'listviewenternewitem', function( event, $newLi ) { -- To view, visit https://gerrit.wikimedia.org/r/52410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd776629a1a5189315e7846059e7bf55acf93e93 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - customize (message) - change (mediawiki...SelectTag)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/52416 Change subject: American spelling - customize (message) .. American spelling - customize (message) Change-Id: Ic7bb2fe445da43ccfcfeb9f16550c242f28791de --- M SelectTag.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SelectTag refs/changes/16/52416/1 diff --git a/SelectTag.i18n.php b/SelectTag.i18n.php index 52b9657..bb0ff04 100644 --- a/SelectTag.i18n.php +++ b/SelectTag.i18n.php @@ -13,7 +13,7 @@ * @author Khaled El Mansoury */ $messages['en'] = array( - 'selecttag-desc' = 'Adds customisable lt;selectgt; for inserting text via database fetching', + 'selecttag-desc' = 'Adds customizable lt;selectgt; for inserting text via database fetching', 'selecttag-sourceattr-unspecified' = 'Error: Source attribute not specified.', ); -- To view, visit https://gerrit.wikimedia.org/r/52416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7bb2fe445da43ccfcfeb9f16550c242f28791de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SelectTag Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make sort utils not static and move sort orders out of class - change (mediawiki...Wikibase)
Denny Vrandecic has submitted this change and it was merged. Change subject: make sort utils not static and move sort orders out of class .. make sort utils not static and move sort orders out of class - also add support for alphabetic_sr (serbian) sort order Change-Id: Id67d84e32662807dc72fc5d6bd214219ff62b825 --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php M client/config/WikibaseClient.default.php A client/includes/InterwikiSorter.php D client/includes/SortUtils.php A client/tests/phpunit/includes/InterwikiSorterTest.php 6 files changed, 356 insertions(+), 181 deletions(-) Approvals: Denny Vrandecic: Verified; Looks good to me, approved diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 0a59dc4..4c556d7 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -552,7 +552,14 @@ if ( $useRepoLinks || Settings::get( 'alwaysSort' ) ) { // sort links - SortUtils::sortLinks( $parserOutput-getLanguageLinks() ); + $interwikiSorter = new InterwikiSorter( + Settings::get( 'sort' ), + Settings::get( 'interwikiSortOrders' ), + Settings::get( 'sortPrepend' ) + ); + $interwikiLinks = $parserOutput-getLanguageLinks(); + $sortedLinks = $interwikiSorter-sortLinks( $interwikiLinks ); + $parserOutput-setLanguageLinks( $sortedLinks ); } wfProfileOut( __METHOD__ ); diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 597a8a5..671d677 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -61,9 +61,9 @@ $wgAutoloadClasses['Wikibase\CachedEntity']= $dir . 'includes/CachedEntity.php'; $wgAutoloadClasses['Wikibase\ClientUtils'] = $dir . 'includes/ClientUtils.php'; $wgAutoloadClasses['Wikibase\EntityCacheUpdater'] = $dir . 'includes/EntityCacheUpdater.php'; +$wgAutoloadClasses['Wikibase\InterwikiSorter'] = $dir . 'includes/InterwikiSorter.php'; $wgAutoloadClasses['Wikibase\LangLinkHandler'] = $dir . 'includes/LangLinkHandler.php'; $wgAutoloadClasses['Wikibase\NoLangLinkHandler'] = $dir . 'includes/NoLangLinkHandler.php'; -$wgAutoloadClasses['Wikibase\SortUtils'] = $dir . 'includes/SortUtils.php'; $wgAutoloadClasses['Wikibase\ChangeHandler'] = $dir . 'includes/ChangeHandler.php'; $wgAutoloadClasses['Wikibase\NamespaceChecker']= $dir . 'includes/NamespaceChecker.php'; diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 5bfe604..c2da880 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -59,3 +59,97 @@ 'wikibase-property' = 'Property' ) ); + +/** + * @todo this is a bit wikimedia-specific and need to find a better place for this stuff, + * such as mediawiki-config or somewhere. + * + * alphabetic and alphabetic revised come from: + * http://meta.wikimedia.org/w/index.php?title=MediaWiki:Interwiki_config-sorting_order-native-languagename + * http://meta.wikimedia.org/w/index.php?title=MediaWiki:Interwiki_config-sorting_order-native-languagename-firstword (revised) + * and from pywikipedia for alphabetic_sr + */ +$wgWBClientSettings['interwikiSortOrders'] = array( +'alphabetic' = array( +'ace', 'kbd', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc', +'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bm', 'bn', 'bjn', +'zh-min-nan', 'nan', 'map-bms', 'ba', 'be', 'be-x-old', 'bh', 'bcl', 'bi', +'bg', 'bar', 'bo', 'bs', 'br', 'bxr', 'ca', 'cv', 'ceb', 'cs', 'ch', +'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 'dk', 'pdc', 'de', +'dv', 'nv', 'dsb', 'dz', 'mh', 'et', 'el', 'eml', 'en', 'myv', 'es', 'eo', +'ext', 'eu', 'ee', 'fa', 'hif', 'fo', 'fr', 'fy', 'ff', 'fur', 'ga', 'gv', +'gag', 'gd', 'gl', 'gan', 'ki', 'glk', 'gu', 'got', 'hak', 'xal', 'ko', 'ha', +'haw', 'hy', 'hi', 'ho', 'hsb', 'hr', 'io', 'ig', 'ilo', 'bpy', 'id', 'ia', +'ie', 'iu', 'ik', 'os', 'xh', 'zu', 'is', 'it', 'he', 'jv', 'kl', 'kn', 'kr', +'pam', 'krc', 'ka', 'ks', 'csb', 'kk', 'kw', 'rw', 'rn', 'sw', 'kv', 'kg', +'ht', 'ku', 'kj', 'ky', 'mrj', 'lad', 'lbe', 'lez', 'lo', 'ltg', 'la', 'lv', +'lb', 'lt', 'lij', 'li', 'ln', 'jbo', 'lg', 'lmo', 'hu', 'mk', 'mg', 'ml', +'mt', 'mi', 'mr', 'xmf', 'arz', 'mzn', 'ms', 'min', 'cdo', 'mwl', 'mdf', 'mo', +'mn', 'mus', 'my', 'nah', 'na', 'fj', 'nl', 'nds-nl', 'cr', 'ne', 'new', 'ja', +'nap', 'ce', 'frr', 'pih', 'no', 'nb',
[MediaWiki-commits] [Gerrit] add fywiki sort order and allow custom order in settings - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/52417 Change subject: add fywiki sort order and allow custom order in settings .. add fywiki sort order and allow custom order in settings Change-Id: I07c3448b253330a2f834e48e565dd0eb28aa45d9 --- M client/config/WikibaseClient.default.php M client/includes/InterwikiSorter.php M client/tests/phpunit/includes/InterwikiSorterTest.php 3 files changed, 46 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/17/52417/1 diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index c2da880..1a564c1 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -62,7 +62,7 @@ /** * @todo this is a bit wikimedia-specific and need to find a better place for this stuff, - * such as mediawiki-config or somewhere. + * such as mediawiki-config, mediawiki messages for custom orders, or somewhere. * * alphabetic and alphabetic revised come from: * http://meta.wikimedia.org/w/index.php?title=MediaWiki:Interwiki_config-sorting_order-native-languagename @@ -151,5 +151,32 @@ 'tk', 'tw', 'udm', 'uk', 'ur', 'ug', 'za', 'vec', 'vep', 'vo', 'fiu-vro', 'wa', 'vls', 'war', 'wo', 'wuu', 'ts', 'xmf', 'yi', 'yo', 'diq', 'zea', 'zh', 'zh-tw', 'zh-cn', 'zh-classical', 'zh-yue', 'bat-smg' -) +), + 'alphabetic_fy' = array( + 'aa', 'ab', 'ace', 'af', 'ay', 'ak', 'als', 'am', 'an', 'ang', 'ar', 'arc', + 'arz', 'as', 'ast', 'av', 'az', 'ba', 'bar', 'bat-smg', 'bcl', 'be', 'be-x-old', + 'bg', 'bh', 'bi', 'bjn', 'bm', 'bn', 'bo', 'bpy', 'br', 'bs', 'bug', 'bxr', + 'ca', 'cbk-zam', 'cdo', 'ce', 'ceb', 'ch', 'chy', 'cho', 'chr', 'cy', 'ckb', + 'co', 'cr', 'crh', 'cs', 'csb', 'cu', 'cv', 'da', 'de', 'diq', 'dk', 'dsb', 'dv', + 'dz', 'ee', 'el', 'eml', 'en', 'eo', 'es', 'et', 'eu', 'ext', 'fa', 'ff', 'fi', + 'fy', 'fiu-vro', 'fj', 'fo', 'fr', 'frp', 'frr', 'fur', 'ga', 'gag', 'gan', 'gd', + 'gl', 'glk', 'gn', 'got', 'gu', 'gv', 'ha', 'hak', 'haw', 'he', 'hi', 'hy', + 'hif', 'ho', 'hr', 'hsb', 'ht', 'hu', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'yi', + 'ik', 'ilo', 'io', 'yo', 'is', 'it', 'iu', 'ja', 'jbo', 'jv', 'ka', 'kaa', 'kab', + 'kbd', 'kg', 'ki', 'ky', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'koi', 'kr', 'krc', + 'ks', 'ksh', 'ku', 'kv', 'kw', 'la', 'lad', 'lb', 'lbe', 'lez', 'lg', 'li', + 'lij', 'lmo', 'ln', 'lo', 'lt', 'ltg', 'lv', 'map-bms', 'mdf', 'mg', 'mh', 'mhr', + 'mi', 'my', 'min', 'myv', 'mk', 'ml', 'mn', 'mo', 'mr', 'mrj', 'ms', 'mt', 'mus', + 'mwl', 'mzn', 'na', 'nah', 'nan', 'nap', 'nds', 'nds-nl', 'ne', 'new', 'ng', 'ny', + 'nl', 'nn', 'no', 'nov', 'nrm', 'nso', 'nv', 'oc', 'om', 'or', 'os', 'pa', 'pag', + 'pam', 'pap', 'pcd', 'pdc', 'pfl', 'pi', 'pih', 'pl', 'pms', 'pnb', 'pnt', 'ps', + 'pt', 'qu', 'rm', 'rmy', 'rn', 'ro', 'roa-rup', 'roa-tara', 'ru', 'rue', 'rw', + 'sa', 'sah', 'sc', 'scn', 'sco', 'sd', 'se', 'sg', 'sh', 'shi', 'si', 'simple', + 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'srn', 'ss', 'st', 'stq', 'su', 'sv', + 'sw', 'szl', 'ta', 'te', 'tet', 'tg', 'th', 'ti', 'ty', 'tk', 'tl', 'tn', 'to', + 'tokipona', 'tp', 'tpi', 'tr', 'ts', 'tt', 'tum', 'tw', 'udm', 'ug', 'uk', 'ur', + 'uz', 've', 'vec', 'vep', 'vi', 'vls', 'vo', 'wa', 'war', 'wo', 'wuu', 'xal', + 'xh', 'xmf', 'za', 'zea', 'zh', 'zh-classical', 'zh-cn', 'zh-yue', 'zh-min-nan', + 'zh-tw', 'zu' + ), ); diff --git a/client/includes/InterwikiSorter.php b/client/includes/InterwikiSorter.php index 7313bb8..9b35b1f 100644 --- a/client/includes/InterwikiSorter.php +++ b/client/includes/InterwikiSorter.php @@ -132,14 +132,20 @@ $sortOrder = $sortOrders['alphabetic_revised']; } else if ( $sort === 'alphabetic_sr' ) { $sortOrder = $sortOrders['alphabetic_sr']; + } else if ( $sort === 'alphabetic_fy' ) { + $sortOrder = $sortOrders['alphabetic_fy']; } else if ( $sort === 'code' ) { // default code sort order sort( $sortOrder ); } else { - // something went wrong but we can use default order - trigger_error( __CLASS__ - . ' : invalid sort order specified for interwiki links.', E_USER_WARNING ); - sort( $sortOrder ); + if ( array_key_exists( $sort, $sortOrders ) ) { +
[MediaWiki-commits] [Gerrit] British spelling - localise (for consistency) - change (mediawiki...CentralNotice)
jenkins-bot has submitted this change and it was merged. Change subject: British spelling - localise (for consistency) .. British spelling - localise (for consistency) Change-Id: I7b482ca043bd3e7948d8953c78575f7155335054 --- M CentralNotice.i18n.php M CentralNotice.php M CentralNoticePageLogPager.php 3 files changed, 6 insertions(+), 6 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index e19501f..f93c6f6 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -110,7 +110,7 @@ 'centralnotice-number-uses' = 'Uses', 'centralnotice-settings' = 'Settings', 'centralnotice-edit-template' = 'Edit banner', - 'centralnotice-edit-template-summary' = 'To create a localizable message, enclose a hyphenated string in three curly brackets, e.g. {{{jimbo-quote}}}.', + 'centralnotice-edit-template-summary' = 'To create a localisable message, enclose a hyphenated string in three curly brackets, e.g. {{{jimbo-quote}}}.', 'centralnotice-message' = 'Message', 'centralnotice-message-not-set' = 'Message not set', 'centralnotice-clone' = 'Clone', diff --git a/CentralNotice.php b/CentralNotice.php index 4a7fb5e..d63a053 100644 --- a/CentralNotice.php +++ b/CentralNotice.php @@ -77,7 +77,7 @@ // $wgNoticeLang and $wgNoticeProject are used for targeting campaigns to specific wikis. These // should be overridden on each wiki with the appropriate values. -// Actual user language (wgUserLanguage) is used for banner localization. +// Actual user language (wgUserLanguage) is used for banner localisation. $wgNoticeLang = $wgLanguageCode; $wgNoticeProject = 'wikipedia'; @@ -532,8 +532,8 @@ $wgCentralBannerRecorder, $wgNoticeNumberOfBuckets, $wgNoticeBucketExpiry, $wgNoticeNumberOfControllerBuckets, $wgNoticeCookieShortExpiry, $wgScript; - // Making these calls too soon will causes issues with the namespace localization cache. This seems - // to be just right. We require them at all because MW will 302 page requests made to non localized + // Making these calls too soon will causes issues with the namespace localisation cache. This seems + // to be just right. We require them at all because MW will 302 page requests made to non localised // namespaces which results in wasteful extra calls. if ( !$wgCentralBannerDispatcher ) { $wgCentralBannerDispatcher = {$wgScript}/{$wgContLang-specialPage( 'BannerRandom' )}; diff --git a/CentralNoticePageLogPager.php b/CentralNoticePageLogPager.php index 05313fc..7d709d1 100644 --- a/CentralNoticePageLogPager.php +++ b/CentralNoticePageLogPager.php @@ -110,7 +110,7 @@ 'oldid' = $row-rc_last_oldid ); $diffUrl = htmlspecialchars( $title-getLinkUrl( $querydiff ) ); - // Should diff be localized? It appears not to be elsewhere in the interface. + // Should diff be localised? It appears not to be elsewhere in the interface. // See ChangesList-preCacheMessages() for example. $bannerCell = $bannerLink . nbsp;(a href=\$diffUrl\diff/a); } @@ -131,7 +131,7 @@ 'oldid' = $row-rc_last_oldid ); $diffUrl = htmlspecialchars( $title-getLinkUrl( $querydiff ) ); - // Should diff be localized? It appears not to be elsewhere in the interface. + // Should diff be localised? It appears not to be elsewhere in the interface. // See ChangesList-preCacheMessages() for example. $messageCell = $messageLink . nbsp;(a href=\$diffUrl\diff/a); } -- To view, visit https://gerrit.wikimedia.org/r/52414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b482ca043bd3e7948d8953c78575f7155335054 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - customize (message) - change (mediawiki...SelectTag)
Siebrand has submitted this change and it was merged. Change subject: American spelling - customize (message) .. American spelling - customize (message) Change-Id: Ic7bb2fe445da43ccfcfeb9f16550c242f28791de --- M SelectTag.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/SelectTag.i18n.php b/SelectTag.i18n.php index 52b9657..bb0ff04 100644 --- a/SelectTag.i18n.php +++ b/SelectTag.i18n.php @@ -13,7 +13,7 @@ * @author Khaled El Mansoury */ $messages['en'] = array( - 'selecttag-desc' = 'Adds customisable lt;selectgt; for inserting text via database fetching', + 'selecttag-desc' = 'Adds customizable lt;selectgt; for inserting text via database fetching', 'selecttag-sourceattr-unspecified' = 'Error: Source attribute not specified.', ); -- To view, visit https://gerrit.wikimedia.org/r/52416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7bb2fe445da43ccfcfeb9f16550c242f28791de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SelectTag Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - familiarize/minimize - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: American spelling - familiarize/minimize .. American spelling - familiarize/minimize Change-Id: I4721e9d224b589deb1b88739e8f99e3b63e8280f --- M PageTranslation.i18n.php M TranslateGroupDescriptions.i18n.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/PageTranslation.i18n.php b/PageTranslation.i18n.php index 468c450..87c9de6 100644 --- a/PageTranslation.i18n.php +++ b/PageTranslation.i18n.php @@ -45,7 +45,7 @@ The page can now be span class=plainlinks[$3 translated]/span.', 'tpt-badsect' = '$1 is not a valid name for translation unit $2.', 'tpt-showpage-intro' = 'Below new, existing and deleted translation units are listed. -Before marking this version for translation, check that the changes to translation units are minimised to avoid unnecessary work for translators.', +Before marking this version for translation, check that the changes to translation units are minimized to avoid unnecessary work for translators.', 'tpt-mark-summary' = 'Marked this version for translation', 'tpt-edit-failed' = 'Could not update the page: $1', 'tpt-duplicate' = 'Translation unit name $1 is used more than once.', diff --git a/TranslateGroupDescriptions.i18n.php b/TranslateGroupDescriptions.i18n.php index fe3c7c0..b14765c 100644 --- a/TranslateGroupDescriptions.i18n.php +++ b/TranslateGroupDescriptions.i18n.php @@ -26,7 +26,7 @@ 'translate-group-desc-flaggedrevs' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:FlaggedRevs FlaggedRevs]', 'translate-group-desc-readerfeedback' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:ReaderFeedback ReaderFeedback]', 'translate-group-desc-semantic' = 'Meta message group containing all messages for all [http://semantic-mediawiki.org/ Semantic MediaWiki] extensions', - 'translate-group-desc-translate' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:Translate Translate]; please familiarise yourself with its [//www.mediawiki.org/wiki/Help:Extension:Translate/Glossary glossary]', + 'translate-group-desc-translate' = 'Meta message group containing all messages for the MediaWiki extension [http://www.mediawiki.org/wiki/Extension:Translate Translate]; please familiarize yourself with its [//www.mediawiki.org/wiki/Help:Extension:Translate/Glossary glossary]', 'translate-group-desc-wikiaextensions' = 'Meta message group containing all messages for supported MediaWiki extensions used by [http://www.wikia.com Wikia]', 'translate-group-desc-wikimediaextensions' = 'Meta message group containing all messages for supported MediaWiki extensions used by the [http://wikimedia.org/ Wikimedia Foundation]', 'translate-group-desc-wikimediaextensions-main' = 'Meta message group containing all messages for supported MediaWiki extensions required to be translated for the Wikimedia [http://meta.wikimedia.org/wiki/Language_committee Language committee]', -- To view, visit https://gerrit.wikimedia.org/r/52407 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4721e9d224b589deb1b88739e8f99e3b63e8280f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] American spelling - recognize/customize - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: American spelling - recognize/customize .. American spelling - recognize/customize Change-Id: I41b2f8113cf84e16430c1f59a76acbb539269833 --- M includes/installer/Installer.i18n.php M languages/messages/MessagesEn.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 85f94d8..65870a8 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -317,7 +317,7 @@ You can now [$1 start using your wiki]., 'config-regenerate' = 'Regenerate codeLocalSettings.php/code →', 'config-show-table-status'= 'codeSHOW TABLE STATUS/code query failed!', - 'config-unknown-collation'= '''Warning:''' Database is using unrecognised collation., + 'config-unknown-collation'= '''Warning:''' Database is using unrecognized collation., 'config-db-web-account' = 'Database account for web access', 'config-db-web-help' = 'Select the username and password that the web server will use to connect to the database server, during ordinary operation of the wiki.', 'config-db-web-account-same' = 'Use the same account as for installation', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d7f6016..899c220 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -188,7 +188,7 @@ /** * Magic words - * Customisable syntax for wikitext and elsewhere. + * Customizable syntax for wikitext and elsewhere. * * IDs must be valid identifiers, they cannot contain hyphens. * CASE is 0 to match all case variants, 1 for case-sensitive @@ -3463,7 +3463,7 @@ Please visit [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] and [//translatewiki.net translatewiki.net] if you wish to contribute to the generic MediaWiki localisation.', 'allmessagesnotsupportedDB' = This page cannot be used because '''\$wgUseDatabaseMessages''' has been disabled., 'allmessages-filter-legend' = 'Filter', -'allmessages-filter'= 'Filter by customisation state:', +'allmessages-filter'= 'Filter by customization state:', 'allmessages-filter-unmodified' = 'Unmodified', 'allmessages-filter-all'= 'All', 'allmessages-filter-modified' = 'Modified', -- To view, visit https://gerrit.wikimedia.org/r/52305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41b2f8113cf84e16430c1f59a76acbb539269833 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] setting swappiness to 0 - change (operations/puppet)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/52418 Change subject: setting swappiness to 0 .. setting swappiness to 0 Change-Id: I25d48512d9bb73d0b23601db7e9bcea2c9f109e2 --- M files/misc/50-wikimedia-base.conf.sysctl 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/52418/1 diff --git a/files/misc/50-wikimedia-base.conf.sysctl b/files/misc/50-wikimedia-base.conf.sysctl index 930189d..7bf1f80 100644 --- a/files/misc/50-wikimedia-base.conf.sysctl +++ b/files/misc/50-wikimedia-base.conf.sysctl @@ -22,7 +22,8 @@ net.ipv4.tcp_max_syn_backlog = 4096 # Swapping makes things too slow and should be done rarely -vm.swappiness = 10 +# 0 = only swap in oom conditions (does not disable swap) +vm.swappiness = 0 # The default TCP keepalive time of 2H is too long net.ipv4.tcp_keepalive_time = 300 -- To view, visit https://gerrit.wikimedia.org/r/52418 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25d48512d9bb73d0b23601db7e9bcea2c9f109e2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher afeld...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] setting swappiness to 0 - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: setting swappiness to 0 .. setting swappiness to 0 Change-Id: I25d48512d9bb73d0b23601db7e9bcea2c9f109e2 --- M files/misc/50-wikimedia-base.conf.sysctl 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Asher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/50-wikimedia-base.conf.sysctl b/files/misc/50-wikimedia-base.conf.sysctl index 930189d..7bf1f80 100644 --- a/files/misc/50-wikimedia-base.conf.sysctl +++ b/files/misc/50-wikimedia-base.conf.sysctl @@ -22,7 +22,8 @@ net.ipv4.tcp_max_syn_backlog = 4096 # Swapping makes things too slow and should be done rarely -vm.swappiness = 10 +# 0 = only swap in oom conditions (does not disable swap) +vm.swappiness = 0 # The default TCP keepalive time of 2H is too long net.ipv4.tcp_keepalive_time = 300 -- To view, visit https://gerrit.wikimedia.org/r/52418 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25d48512d9bb73d0b23601db7e9bcea2c9f109e2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher afeld...@wikimedia.org Gerrit-Reviewer: Asher afeld...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits