From: jenkins-bot Date: Thu, 11 Apr 2019 06:45:16 +0000 (+0000) Subject: Merge "Rehabilitate DateFormatter" X-Git-Tag: 1.34.0-rc.0~2058 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=1f163231a6eb5d3e11f55d3d65b5acb45a4d80f8;hp=76ca6c9b184da0c9a5f9c9e701e6257dbbdb077d;p=lhc%2Fweb%2Fwiklou.git Merge "Rehabilitate DateFormatter" --- diff --git a/HISTORY b/HISTORY index a38e215771..426eb17b90 100644 --- a/HISTORY +++ b/HISTORY @@ -1,4 +1,4 @@ -Change notes from older releases. For current info see RELEASE-NOTES-1.33. +Change notes from older releases. For current info see RELEASE-NOTES-1.34. = MediaWiki 1.32 = diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index fd316c4e27..09fd35e5b0 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -4,8 +4,8 @@ THIS IS NOT A RELEASE YET -MediaWiki 1.33 is an alpha-quality branch and is not recommended for use in -production. +MediaWiki 1.33 is a pre-release testing branch, and is not recommended for use +in production. == Upgrading notes for 1.33 == 1.33 has several database changes since 1.32, and will not work without schema @@ -366,6 +366,8 @@ because of Phabricator reports. For classes that inherit from MediaWikiTestCase and used setMwGlobals() to modify a variable that affects namespaces, caches will automatically be reset and any calls to MWNamespace::clearCaches() can be removed entirely. +* ReadOnlyMode::clearCache() and ConfiguredReadOnlyMode::clearCache() have been + removed. Use MediaWikiTestCase::overrideMwServices() instead. === Deprecations in 1.33 === * The configuration option $wgUseESI has been deprecated, and is expected diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 new file mode 100644 index 0000000000..a1c50d09f8 --- /dev/null +++ b/RELEASE-NOTES-1.34 @@ -0,0 +1,115 @@ += MediaWiki 1.34 = + +== MediaWiki 1.34.0-PRERELEASE == + +THIS IS NOT A RELEASE YET + +MediaWiki 1.34 is an alpha-quality development branch, and is not recommended +for use in production. + +== Upgrading notes for 1.34 == +1.34 has several database changes since 1.33, and will not work without schema +updates. Note that due to changes to some very large tables like the revision +table, the schema update may take quite long (minutes on a medium sized site, +many hours on a large site). + +Don't forget to always back up your database before upgrading! + +See the file UPGRADE for more detailed upgrade instructions, including +important information when upgrading from versions prior to 1.11. + +Some specific notes for MediaWiki 1.34 upgrades are below: + +* … + +For notes on 1.33.x and older releases, see HISTORY. + +=== Configuration changes for system administrators in 1.34 === +==== New configuration ==== +* … + +==== Changed configuration ==== +* … + +==== Removed configuration ==== +* … + +=== New user-facing features in 1.34 === +* … + +=== New developer features in 1.34 === +* … + +=== External library changes in 1.34 === +==== New external libraries ==== +* … + +==== Changed external libraries ==== +* … + +==== Removed external libraries ==== +* … + +=== Bug fixes in 1.34 === +* … + +=== Action API changes in 1.34 === +* … + +=== Action API internal changes in 1.34 === +* … + +=== Languages updated in 1.34 === +MediaWiki supports over 350 languages. Many localisations are updated regularly. +Below only new and removed languages are listed, as well as changes to languages +because of Phabricator reports. + +* … + +=== Breaking changes in 1.34 === +* … + +=== Deprecations in 1.34 === +* … + +=== Other changes in 1.34 === +* … + +== Compatibility == +MediaWiki 1.34 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is +supported, it is generally advised to use PHP 7.0.13 or later for long term +support. + +MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used, +but support for them is somewhat less mature. There is experimental support for +Oracle and Microsoft SQL Server. + +The supported versions are: + +* MySQL 5.5.8 or later +* PostgreSQL 9.2 or later +* SQLite 3.8.0 or later +* Oracle 9.0.1 or later +* Microsoft SQL Server 2005 (9.00.1399) + +== Online documentation == +Documentation for both end-users and site administrators is available on +MediaWiki.org, and is covered under the GNU Free Documentation License (except +for pages that explicitly state that their contents are in the public domain): + + https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation + +== Mailing list == +A mailing list is available for MediaWiki user support and discussion: + + https://lists.wikimedia.org/mailman/listinfo/mediawiki-l + +A low-traffic announcements-only list is also available: + + https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce + +It's highly recommended that you sign up for one of these lists if you're +going to run a public MediaWiki, so you can be notified of security fixes. + +== IRC help == +There's usually someone online in #mediawiki on irc.freenode.net. diff --git a/autoload.php b/autoload.php index e713017200..033c4bedf4 100644 --- a/autoload.php +++ b/autoload.php @@ -566,6 +566,7 @@ $wgAutoloadLocalClasses = [ 'GenerateNormalizerDataMl' => __DIR__ . '/maintenance/language/generateNormalizerDataMl.php', 'GenerateSitemap' => __DIR__ . '/maintenance/generateSitemap.php', 'GenericArrayObject' => __DIR__ . '/includes/libs/GenericArrayObject.php', + 'GenericParameterJob' => __DIR__ . '/includes/jobqueue/GenericParameterJob.php', 'GetConfiguration' => __DIR__ . '/maintenance/getConfiguration.php', 'GetLagTimes' => __DIR__ . '/maintenance/getLagTimes.php', 'GetReplicaServer' => __DIR__ . '/maintenance/getReplicaServer.php', @@ -1290,6 +1291,7 @@ $wgAutoloadLocalClasses = [ 'RowUpdateGenerator' => __DIR__ . '/includes/utils/RowUpdateGenerator.php', 'RunBatchedQuery' => __DIR__ . '/maintenance/runBatchedQuery.php', 'RunJobs' => __DIR__ . '/maintenance/runJobs.php', + 'RunnableJob' => __DIR__ . '/includes/jobqueue/RunnableJob.php', 'SVGMetadataExtractor' => __DIR__ . '/includes/media/SVGMetadataExtractor.php', 'SVGReader' => __DIR__ . '/includes/media/SVGMetadataExtractor.php', 'SamplingStatsdClient' => __DIR__ . '/includes/libs/stats/SamplingStatsdClient.php', diff --git a/includes/ConfiguredReadOnlyMode.php b/includes/ConfiguredReadOnlyMode.php index 17c28ec388..7df2aed281 100644 --- a/includes/ConfiguredReadOnlyMode.php +++ b/includes/ConfiguredReadOnlyMode.php @@ -63,11 +63,4 @@ class ConfiguredReadOnlyMode { public function setReason( $msg ) { $this->overrideReason = $msg; } - - /** - * Clear the cache of the read only file - */ - public function clearCache() { - $this->fileReason = null; - } } diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 44e031046a..4dece5bfaf 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -72,7 +72,7 @@ $wgConfigRegistry = [ * MediaWiki version number * @since 1.2 */ -$wgVersion = '1.33.0-alpha'; +$wgVersion = '1.34.0-alpha'; /** * Name of the site. It must be changed in LocalSettings.php diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index 01d5f9dac3..3f08a37cf4 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -36,7 +36,7 @@ */ class PHPVersionCheck { /* @var string The number of the MediaWiki version used. */ - var $mwVersion = '1.33'; + var $mwVersion = '1.34'; /* @var array A mapping of PHP functions to PHP extensions. */ var $functionsExtensionsMapping = array( diff --git a/includes/ReadOnlyMode.php b/includes/ReadOnlyMode.php index e767359929..1a0929026f 100644 --- a/includes/ReadOnlyMode.php +++ b/includes/ReadOnlyMode.php @@ -58,11 +58,4 @@ class ReadOnlyMode { public function setReason( $msg ) { $this->configuredReadOnly->setReason( $msg ); } - - /** - * Clear the cache of the read only file - */ - public function clearCache() { - $this->configuredReadOnly->clearCache(); - } } diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 8bb8e25db9..fed1b6dbab 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -575,8 +575,13 @@ return [ }, 'SpecialPageFactory' => function ( MediaWikiServices $services ) : SpecialPageFactory { + $config = $services->getMainConfig(); + $options = []; + foreach ( SpecialPageFactory::$constructorOptions as $key ) { + $options[$key] = $config->get( $key ); + } return new SpecialPageFactory( - $services->getMainConfig(), + $options, $services->getContentLanguage() ); }, diff --git a/includes/api/i18n/pt.json b/includes/api/i18n/pt.json index df5fd69d3c..67465e2458 100644 --- a/includes/api/i18n/pt.json +++ b/includes/api/i18n/pt.json @@ -1228,6 +1228,7 @@ "apihelp-query+userinfo-paramvalue-prop-registrationdate": "Adiciona a data de registo do utilizador.", "apihelp-query+userinfo-paramvalue-prop-unreadcount": "Adiciona a contagem de páginas não lidas da lista de páginas vigiadas do utilizador (máximo $1; devolve $2 se forem mais).", "apihelp-query+userinfo-paramvalue-prop-centralids": "Adiciona os identificadores centrais e o estado de ligação central (''attachment'') do utilizador.", + "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "Adiciona a data da última contribuição do utilizador.", "apihelp-query+userinfo-param-attachedwiki": "Com $1prop=centralids, indicar se o utilizador tem ligação com a wiki designada por este identificador.", "apihelp-query+userinfo-example-simple": "Obter informações sobre o utilizador atual.", "apihelp-query+userinfo-example-data": "Obter informações adicionais sobre o utilizador atual.", diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 3d80bbd011..7f79ca1c0b 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -21,7 +21,7 @@ * @ingroup Database */ -use MediaWiki\MediaWikiServices; +use Wikimedia\Timestamp\ConvertibleTimestamp; use Wikimedia\Rdbms\Database; use Wikimedia\Rdbms\DatabaseDomain; use Wikimedia\Rdbms\Blob; @@ -55,6 +55,8 @@ class DatabaseOracle extends Database { function __construct( array $p ) { $p['tablePrefix'] = strtoupper( $p['tablePrefix'] ); parent::__construct( $p ); + + // @TODO: dependency inject Hooks::run( 'DatabaseOraclePostInit', [ $this ] ); } @@ -79,8 +81,6 @@ class DatabaseOracle extends Database { } protected function open( $server, $user, $password, $dbName, $schema, $tablePrefix ) { - global $wgDBOracleDRCP; - if ( !function_exists( 'oci_connect' ) ) { throw new DBConnectionError( $this, @@ -107,10 +107,6 @@ class DatabaseOracle extends Database { return null; } - if ( $wgDBOracleDRCP ) { - $this->setFlag( DBO_PERSISTENT ); - } - $session_mode = ( $this->flags & DBO_SYSDBA ) ? OCI_SYSDBA : OCI_DEFAULT; Wikimedia\suppressWarnings(); @@ -185,8 +181,8 @@ class DatabaseOracle extends Database { */ protected function doQuery( $sql ) { wfDebug( "SQL: [$sql]\n" ); - if ( !StringUtils::isUtf8( $sql ) ) { - throw new InvalidArgumentException( "SQL encoding is invalid\n$sql" ); + if ( !mb_check_encoding( (string)$sql, 'UTF-8' ) ) { + throw new DBUnexpectedError( $this, "SQL encoding is invalid\n$sql" ); } // handle some oracle specifics @@ -420,7 +416,11 @@ class DatabaseOracle extends Database { } if ( $val === null ) { - if ( $col_info != false && $col_info->isNullable() == 0 && $col_info->defaultValue() != null ) { + if ( + $col_info != false && + $col_info->isNullable() == 0 && + $col_info->defaultValue() != null + ) { $bind .= 'DEFAULT'; } else { $bind .= 'NULL'; @@ -481,12 +481,14 @@ class DatabaseOracle extends Database { } // backward compatibility - if ( preg_match( '/^timestamp.*/i', $col_type ) == 1 && strtolower( $val ) == 'infinity' ) { + if ( + preg_match( '/^timestamp.*/i', $col_type ) == 1 && + strtolower( $val ) == 'infinity' + ) { $val = $this->getInfinity(); } - $val = MediaWikiServices::getInstance()->getContentLanguage()-> - checkTitleEncoding( $val ); + $val = $this->getVerifiedUTF8( $val ); if ( oci_bind_by_name( $stmt, ":$col", $val, -1, SQLT_CHR ) === false ) { $e = oci_error( $stmt ); $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); @@ -498,7 +500,10 @@ class DatabaseOracle extends Database { $lob[$col] = oci_new_descriptor( $this->conn, OCI_D_LOB ); if ( $lob[$col] === false ) { $e = oci_error( $stmt ); - throw new DBUnexpectedError( $this, "Cannot create LOB descriptor: " . $e['message'] ); + throw new DBUnexpectedError( + $this, + "Cannot create LOB descriptor: " . $e['message'] + ); } if ( is_object( $val ) ) { @@ -554,7 +559,8 @@ class DatabaseOracle extends Database { if ( $sequenceData !== false && !isset( $varMap[$sequenceData['column']] ) ) { - $varMap[$sequenceData['column']] = 'GET_SEQUENCE_VALUE(\'' . $sequenceData['sequence'] . '\')'; + $varMap[$sequenceData['column']] = + 'GET_SEQUENCE_VALUE(\'' . $sequenceData['sequence'] . '\')'; } // count-alias subselect fields to avoid abigious definition errors @@ -573,7 +579,8 @@ class DatabaseOracle extends Database { $selectJoinConds ); - $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ') ' . $selectSql; + $sql = "INSERT INTO $destTable (" . + implode( ',', array_keys( $varMap ) ) . ') ' . $selectSql; if ( in_array( 'IGNORE', $insertOptions ) ) { $this->ignoreDupValOnIndex = true; @@ -756,8 +763,10 @@ class DatabaseOracle extends Database { return $this->doQuery( "DROP TABLE $tableName CASCADE CONSTRAINTS PURGE" ); } - function timestamp( $ts = 0 ) { - return wfTimestamp( TS_ORACLE, $ts ); + public function timestamp( $ts = 0 ) { + $t = new ConvertibleTimestamp( $ts ); + // Let errors bubble up to avoid putting garbage in the DB + return $t->getTimestamp( TS_ORACLE ); } /** @@ -912,7 +921,10 @@ class DatabaseOracle extends Database { */ function fieldInfo( $table, $field ) { if ( is_array( $table ) ) { - throw new DBUnexpectedError( $this, 'DatabaseOracle::fieldInfo called with table array!' ); + throw new DBUnexpectedError( + $this, + 'DatabaseOracle::fieldInfo called with table array!' + ); } return $this->fieldInfoMulti( $table, $field ); @@ -1061,12 +1073,7 @@ class DatabaseOracle extends Database { } function addQuotes( $s ) { - $contLang = MediaWikiServices::getInstance()->getContentLanguage(); - if ( isset( $contLang->mLoaded ) && $contLang->mLoaded ) { - $s = $contLang->checkTitleEncoding( $s ); - } - - return "'" . $this->strencode( $s ) . "'"; + return "'" . $this->strencode( $this->getVerifiedUTF8( $s ) ) . "'"; } public function addIdentifierQuotes( $s ) { @@ -1090,11 +1097,9 @@ class DatabaseOracle extends Database { $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; if ( $col_type == 'CLOB' ) { $col = 'TO_CHAR(' . $col . ')'; - $val = - MediaWikiServices::getInstance()->getContentLanguage()->checkTitleEncoding( $val ); + $val = $this->getVerifiedUTF8( $val ); } elseif ( $col_type == 'VARCHAR2' ) { - $val = - MediaWikiServices::getInstance()->getContentLanguage()->checkTitleEncoding( $val ); + $val = $this->getVerifiedUTF8( $val ); } } @@ -1260,12 +1265,14 @@ class DatabaseOracle extends Database { $val = $val->getData(); } - if ( preg_match( '/^timestamp.*/i', $col_type ) == 1 && strtolower( $val ) == 'infinity' ) { + if ( + preg_match( '/^timestamp.*/i', $col_type ) == 1 && + strtolower( $val ) == 'infinity' + ) { $val = '31-12-2030 12:00:00.000000'; } - $val = MediaWikiServices::getInstance()->getContentLanguage()-> - checkTitleEncoding( $val ); + $val = $this->getVerifiedUTF8( $val ); if ( oci_bind_by_name( $stmt, ":$col", $val ) === false ) { $e = oci_error( $stmt ); $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); @@ -1277,7 +1284,10 @@ class DatabaseOracle extends Database { $lob[$col] = oci_new_descriptor( $this->conn, OCI_D_LOB ); if ( $lob[$col] === false ) { $e = oci_error( $stmt ); - throw new DBUnexpectedError( $this, "Cannot create LOB descriptor: " . $e['message'] ); + throw new DBUnexpectedError( + $this, + "Cannot create LOB descriptor: " . $e['message'] + ); } if ( is_object( $val ) ) { @@ -1366,4 +1376,16 @@ class DatabaseOracle extends Database { public function getInfinity() { return '31-12-2030 12:00:00.000000'; } + + /** + * @param string $s + * @return string + */ + private function getVerifiedUTF8( $s ) { + if ( mb_check_encoding( (string)$s, 'UTF-8' ) ) { + return $s; // valid + } + + throw new DBUnexpectedError( $this, "Non BLOB/CLOB field must be UTF-8." ); + } } diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index bbb3d2f7b7..f0aa8b2424 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -53,7 +53,7 @@ abstract class MWLBFactory { ) { global $wgCommandLineMode; - static $typesWithSchema = [ 'postgres', 'msssql' ]; + $typesWithSchema = self::getDbTypesWithSchemas(); $lbConf += [ 'localDomain' => new DatabaseDomain( @@ -82,77 +82,29 @@ abstract class MWLBFactory { // for Database classes in the relevant Installer subclass. // Such as MysqlInstaller::openConnection and PostgresInstaller::openConnectionWithParams. if ( $lbConf['class'] === Wikimedia\Rdbms\LBFactorySimple::class ) { - $httpMethod = $_SERVER['REQUEST_METHOD'] ?? null; - // T93097: hint for how file-based databases (e.g. sqlite) should go about locking. - // See https://www.sqlite.org/lang_transaction.html - // See https://www.sqlite.org/lockingv3.html#shared_lock - $isReadRequest = in_array( $httpMethod, [ 'GET', 'HEAD', 'OPTIONS', 'TRACE' ] ); - if ( isset( $lbConf['servers'] ) ) { - // Server array is already explicitly configured; leave alone + // Server array is already explicitly configured } elseif ( is_array( $mainConfig->get( 'DBservers' ) ) ) { $lbConf['servers'] = []; foreach ( $mainConfig->get( 'DBservers' ) as $i => $server ) { - if ( $server['type'] === 'sqlite' ) { - $server += [ - 'dbDirectory' => $mainConfig->get( 'SQLiteDataDir' ), - 'trxMode' => $isReadRequest ? 'DEFERRED' : 'IMMEDIATE' - ]; - } elseif ( $server['type'] === 'postgres' ) { - $server += [ - 'port' => $mainConfig->get( 'DBport' ), - // Work around the reserved word usage in MediaWiki schema - 'keywordTableMap' => [ 'user' => 'mwuser', 'text' => 'pagecontent' ] - ]; - } elseif ( $server['type'] === 'mssql' ) { - $server += [ - 'port' => $mainConfig->get( 'DBport' ), - 'useWindowsAuth' => $mainConfig->get( 'DBWindowsAuthentication' ) - ]; - } - - if ( in_array( $server['type'], $typesWithSchema, true ) ) { - $server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ]; - } - - $server += [ - 'tablePrefix' => $mainConfig->get( 'DBprefix' ), - 'flags' => DBO_DEFAULT, - 'sqlMode' => $mainConfig->get( 'SQLMode' ), - ]; - - $lbConf['servers'][$i] = $server; + $lbConf['servers'][$i] = self::initServerInfo( $server, $mainConfig ); } } else { - $flags = DBO_DEFAULT; - $flags |= $mainConfig->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0; - $flags |= $mainConfig->get( 'DBssl' ) ? DBO_SSL : 0; - $flags |= $mainConfig->get( 'DBcompress' ) ? DBO_COMPRESS : 0; - $server = [ - 'host' => $mainConfig->get( 'DBserver' ), - 'user' => $mainConfig->get( 'DBuser' ), - 'password' => $mainConfig->get( 'DBpassword' ), - 'dbname' => $mainConfig->get( 'DBname' ), - 'tablePrefix' => $mainConfig->get( 'DBprefix' ), - 'type' => $mainConfig->get( 'DBtype' ), - 'load' => 1, - 'flags' => $flags, - 'sqlMode' => $mainConfig->get( 'SQLMode' ), - 'trxMode' => $isReadRequest ? 'DEFERRED' : 'IMMEDIATE' - ]; - if ( in_array( $server['type'], $typesWithSchema, true ) ) { - $server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ]; - } - if ( $server['type'] === 'sqlite' ) { - $server[ 'dbDirectory'] = $mainConfig->get( 'SQLiteDataDir' ); - } elseif ( $server['type'] === 'postgres' ) { - $server['port'] = $mainConfig->get( 'DBport' ); - // Work around the reserved word usage in MediaWiki schema - $server['keywordTableMap'] = [ 'user' => 'mwuser', 'text' => 'pagecontent' ]; - } elseif ( $server['type'] === 'mssql' ) { - $server['port'] = $mainConfig->get( 'DBport' ); - $server['useWindowsAuth'] = $mainConfig->get( 'DBWindowsAuthentication' ); - } + $server = self::initServerInfo( + [ + 'host' => $mainConfig->get( 'DBserver' ), + 'user' => $mainConfig->get( 'DBuser' ), + 'password' => $mainConfig->get( 'DBpassword' ), + 'dbname' => $mainConfig->get( 'DBname' ), + 'type' => $mainConfig->get( 'DBtype' ), + 'load' => 1 + ], + $mainConfig + ); + + $server['flags'] |= $mainConfig->get( 'DBssl' ) ? DBO_SSL : 0; + $server['flags'] |= $mainConfig->get( 'DBcompress' ) ? DBO_COMPRESS : 0; + $lbConf['servers'] = [ $server ]; } if ( !isset( $lbConf['externalClusters'] ) ) { @@ -167,15 +119,71 @@ abstract class MWLBFactory { } $lbConf['serverTemplate']['sqlMode'] = $mainConfig->get( 'SQLMode' ); } - $serversCheck = $lbConf['serverTemplate'] ?? []; + $serversCheck = [ $lbConf['serverTemplate'] ] ?? []; } - self::sanityCheckServerConfig( $serversCheck, $mainConfig ); - $lbConf = self::applyDefaultCaching( $lbConf, $srvCace, $mainStash, $wanCache ); + self::assertValidServerConfigs( $serversCheck, $mainConfig ); + + $lbConf = self::injectObjectCaches( $lbConf, $srvCace, $mainStash, $wanCache ); return $lbConf; } + /** + * @return array + */ + private static function getDbTypesWithSchemas() { + return [ 'postgres', 'msssql' ]; + } + + /** + * @param array $server + * @param Config $mainConfig + * @return array + */ + private static function initServerInfo( array $server, Config $mainConfig ) { + if ( $server['type'] === 'sqlite' ) { + $httpMethod = $_SERVER['REQUEST_METHOD'] ?? null; + // T93097: hint for how file-based databases (e.g. sqlite) should go about locking. + // See https://www.sqlite.org/lang_transaction.html + // See https://www.sqlite.org/lockingv3.html#shared_lock + $isHttpRead = in_array( $httpMethod, [ 'GET', 'HEAD', 'OPTIONS', 'TRACE' ] ); + $server += [ + 'dbDirectory' => $mainConfig->get( 'SQLiteDataDir' ), + 'trxMode' => $isHttpRead ? 'DEFERRED' : 'IMMEDIATE' + ]; + } elseif ( $server['type'] === 'postgres' ) { + $server += [ + 'port' => $mainConfig->get( 'DBport' ), + // Work around the reserved word usage in MediaWiki schema + 'keywordTableMap' => [ 'user' => 'mwuser', 'text' => 'pagecontent' ] + ]; + } elseif ( $server['type'] === 'mssql' ) { + $server += [ + 'port' => $mainConfig->get( 'DBport' ), + 'useWindowsAuth' => $mainConfig->get( 'DBWindowsAuthentication' ) + ]; + } + + if ( in_array( $server['type'], self::getDbTypesWithSchemas(), true ) ) { + $server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ]; + } + + $flags = DBO_DEFAULT; + $flags |= $mainConfig->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0; + if ( $server['type'] === 'oracle' ) { + $flags |= $mainConfig->get( 'DBOracleDRCP' ) ? DBO_PERSISTENT : 0; + } + + $server += [ + 'tablePrefix' => $mainConfig->get( 'DBprefix' ), + 'flags' => $flags, + 'sqlMode' => $mainConfig->get( 'SQLMode' ), + ]; + + return $server; + } + /** * @param array $lbConf * @param BagOStuff $sCache @@ -183,7 +191,7 @@ abstract class MWLBFactory { * @param WANObjectCache $wCache * @return array */ - private static function applyDefaultCaching( + private static function injectObjectCaches( array $lbConf, BagOStuff $sCache, BagOStuff $mStash, WANObjectCache $wCache ) { // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804) @@ -204,7 +212,7 @@ abstract class MWLBFactory { * @param array $servers * @param Config $mainConfig */ - private static function sanityCheckServerConfig( array $servers, Config $mainConfig ) { + private static function assertValidServerConfigs( array $servers, Config $mainConfig ) { $ldDB = $mainConfig->get( 'DBname' ); // local domain DB $ldTP = $mainConfig->get( 'DBprefix' ); // local domain prefix diff --git a/includes/deferred/CdnCacheUpdate.php b/includes/deferred/CdnCacheUpdate.php index 6f961e8b71..2d07f75156 100644 --- a/includes/deferred/CdnCacheUpdate.php +++ b/includes/deferred/CdnCacheUpdate.php @@ -71,13 +71,10 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate { self::purge( $this->urls ); if ( $wgCdnReboundPurgeDelay > 0 ) { - JobQueueGroup::singleton()->lazyPush( new CdnPurgeJob( - Title::makeTitle( NS_SPECIAL, 'Badtitle/' . __CLASS__ ), - [ - 'urls' => $this->urls, - 'jobReleaseTimestamp' => time() + $wgCdnReboundPurgeDelay - ] - ) ); + JobQueueGroup::singleton()->lazyPush( new CdnPurgeJob( [ + 'urls' => $this->urls, + 'jobReleaseTimestamp' => time() + $wgCdnReboundPurgeDelay + ] ) ); } } diff --git a/includes/htmlform/fields/HTMLDateTimeField.php b/includes/htmlform/fields/HTMLDateTimeField.php index ffdf5f83d2..d1f3c44c71 100644 --- a/includes/htmlform/fields/HTMLDateTimeField.php +++ b/includes/htmlform/fields/HTMLDateTimeField.php @@ -172,6 +172,7 @@ class HTMLDateTimeField extends HTMLTextField { } if ( $this->mType === 'date' ) { + $this->mParent->getOutput()->addModuleStyles( 'mediawiki.widgets.DateInputWidget.styles' ); return new MediaWiki\Widget\DateInputWidget( $params ); } else { return new MediaWiki\Widget\DateTimeInputWidget( $params ); diff --git a/includes/jobqueue/GenericParameterJob.php b/includes/jobqueue/GenericParameterJob.php new file mode 100644 index 0000000000..f7da42bd2e --- /dev/null +++ b/includes/jobqueue/GenericParameterJob.php @@ -0,0 +1,34 @@ += 3 ? func_get_arg( 2 ) : []; } else { - // Subclasses can override getTitle() to return something more meaningful - $title = Title::makeTitle( NS_SPECIAL, 'Blankpage' ); + $title = ( isset( $params['namespace'] ) && isset( $params['title'] ) ) + ? Title::makeTitle( $params['namespace'], $params['title'] ) + : Title::makeTitle( NS_SPECIAL, '' ); } + $params = is_array( $params ) ? $params : []; // sanity + if ( isset( $wgJobClasses[$command] ) ) { $handler = $wgJobClasses[$command]; if ( is_callable( $handler ) ) { $job = call_user_func( $handler, $title, $params ); } elseif ( class_exists( $handler ) ) { - $job = new $handler( $title, $params ); + if ( is_subclass_of( $handler, GenericParameterJob::class ) ) { + $job = new $handler( $params ); + } else { + $job = new $handler( $title, $params ); + } } else { $job = null; } @@ -112,17 +113,27 @@ abstract class Job implements IJobSpecification { if ( $params instanceof Title ) { // Backwards compatibility for old signature ($command, $title, $params) $title = $params; - $params = func_get_arg( 2 ); - } else { - // Subclasses can override getTitle() to return something more meaningful - $title = Title::makeTitle( NS_SPECIAL, 'Blankpage' ); + $params = func_num_args() >= 3 ? func_get_arg( 2 ) : []; + $params = is_array( $params ) ? $params : []; // sanity + // Set namespace/title params if both are missing and this is not a dummy title + if ( + $title->getDBkey() !== '' && + !isset( $params['namespace'] ) && + !isset( $params['title'] ) + ) { + $params['namespace'] = $title->getNamespace(); + $params['title'] = $title->getDBKey(); + // Note that JobQueue classes will prefer the parameters over getTitle() + $this->title = $title; + } } $this->command = $command; - $this->title = $title; - $this->params = is_array( $params ) ? $params : []; - if ( !isset( $this->params['requestId'] ) ) { - $this->params['requestId'] = WebRequest::getRequestId(); + $this->params = $params + [ 'requestId' => WebRequest::getRequestId() ]; + if ( $this->title === null ) { + $this->title = ( isset( $params['namespace'] ) && isset( $params['title'] ) ) + ? Title::makeTitle( $params['namespace'], $params['title'] ) + : Title::makeTitle( NS_SPECIAL, '' ); } } @@ -145,7 +156,7 @@ abstract class Job implements IJobSpecification { /** * @return Title */ - public function getTitle() { + final public function getTitle() { return $this->title; } @@ -268,8 +279,6 @@ abstract class Job implements IJobSpecification { public function getDeduplicationInfo() { $info = [ 'type' => $this->getType(), - 'namespace' => $this->getTitle()->getNamespace(), - 'title' => $this->getTitle()->getDBkey(), 'params' => $this->getParams() ]; if ( is_array( $info['params'] ) ) { diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php index 064400268e..f5ed7b91cb 100644 --- a/includes/jobqueue/JobQueue.php +++ b/includes/jobqueue/JobQueue.php @@ -361,7 +361,7 @@ abstract class JobQueue { * Outside callers should use JobQueueGroup::pop() instead of this function. * * @throws JobQueueError - * @return Job|bool Returns false if there are no jobs + * @return RunnableJob|bool Returns false if there are no jobs */ final public function pop() { $this->assertNotReadOnly(); @@ -383,7 +383,7 @@ abstract class JobQueue { /** * @see JobQueue::pop() - * @return Job|bool + * @return RunnableJob|bool */ abstract protected function doPop(); @@ -393,11 +393,11 @@ abstract class JobQueue { * This does nothing for certain queue classes or if "claimTTL" is not set. * Outside callers should use JobQueueGroup::ack() instead of this function. * - * @param Job $job + * @param RunnableJob $job * @return void * @throws JobQueueError */ - final public function ack( Job $job ) { + final public function ack( RunnableJob $job ) { $this->assertNotReadOnly(); if ( $job->getType() !== $this->type ) { throw new JobQueueError( "Got '{$job->getType()}' job; expected '{$this->type}'." ); @@ -408,9 +408,9 @@ abstract class JobQueue { /** * @see JobQueue::ack() - * @param Job $job + * @param RunnableJob $job */ - abstract protected function doAck( Job $job ); + abstract protected function doAck( RunnableJob $job ); /** * Register the "root job" of a given job into the queue for de-duplication. @@ -482,11 +482,11 @@ abstract class JobQueue { /** * Check if the "root" job of a given job has been superseded by a newer one * - * @param Job $job + * @param IJobSpecification $job * @throws JobQueueError * @return bool */ - final protected function isRootJobOldDuplicate( Job $job ) { + final protected function isRootJobOldDuplicate( IJobSpecification $job ) { if ( $job->getType() !== $this->type ) { throw new JobQueueError( "Got '{$job->getType()}' job; expected '{$this->type}'." ); } @@ -497,10 +497,10 @@ abstract class JobQueue { /** * @see JobQueue::isRootJobOldDuplicate() - * @param Job $job + * @param IJobSpecification $job * @return bool */ - protected function doIsRootJobOldDuplicate( Job $job ) { + protected function doIsRootJobOldDuplicate( IJobSpecification $job ) { if ( !$job->hasRootJobParams() ) { return false; // job has no de-deplication info } @@ -686,6 +686,16 @@ abstract class JobQueue { return null; // not supported } + /** + * @param string $command + * @param array $params + * @return Job + */ + protected function factoryJob( $command, $params ) { + // @TODO: dependency inject this as a callback + return Job::factory( $command, $params ); + } + /** * @throws JobQueueReadOnlyError */ diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php index c2772a6381..47ee5886d4 100644 --- a/includes/jobqueue/JobQueueDB.php +++ b/includes/jobqueue/JobQueueDB.php @@ -290,7 +290,7 @@ class JobQueueDB extends JobQueue { /** * @see JobQueue::doPop() - * @return Job|bool + * @return RunnableJob|bool */ protected function doPop() { $dbw = $this->getMasterDB(); @@ -314,10 +314,12 @@ class JobQueueDB extends JobQueue { break; // nothing to do } $this->incrStats( 'pops', $this->type ); + // Get the job object from the row... - $title = Title::makeTitle( $row->job_namespace, $row->job_title ); - $job = Job::factory( $row->job_cmd, $title, - self::extractBlob( $row->job_params ) ); + $params = self::extractBlob( $row->job_params ); + $params = is_array( $params ) ? $params : []; // sanity + $params += [ 'namespace' => $row->job_namespace, 'title' => $row->job_title ]; + $job = $this->factoryJob( $row->job_cmd, $params ); $job->setMetadata( 'id', $row->job_id ); $job->setMetadata( 'timestamp', $row->job_timestamp ); break; // done @@ -481,10 +483,10 @@ class JobQueueDB extends JobQueue { /** * @see JobQueue::doAck() - * @param Job $job + * @param RunnableJob $job * @throws MWException */ - protected function doAck( Job $job ) { + protected function doAck( RunnableJob $job ) { $id = $job->getMetadata( 'id' ); if ( $id === null ) { throw new MWException( "Job of type '{$job->getType()}' has no ID." ); @@ -617,11 +619,14 @@ class JobQueueDB extends JobQueue { return new MappedIterator( $dbr->select( 'job', self::selectFields(), $conds ), function ( $row ) { - $job = Job::factory( - $row->job_cmd, - Title::makeTitle( $row->job_namespace, $row->job_title ), - strlen( $row->job_params ) ? unserialize( $row->job_params ) : [] - ); + $params = strlen( $row->job_params ) ? unserialize( $row->job_params ) : []; + $params = is_array( $params ) ? $params : []; // sanity + $params += [ + 'namespace' => $row->job_namespace, + 'title' => $row->job_title + ]; + + $job = $this->factoryJob( $row->job_cmd, $params ); $job->setMetadata( 'id', $row->job_id ); $job->setMetadata( 'timestamp', $row->job_timestamp ); @@ -774,8 +779,8 @@ class JobQueueDB extends JobQueue { return [ // Fields that describe the nature of the job 'job_cmd' => $job->getType(), - 'job_namespace' => $job->getTitle()->getNamespace(), - 'job_title' => $job->getTitle()->getDBkey(), + 'job_namespace' => $job->getParams()['namespace'] ?? NS_SPECIAL, + 'job_title' => $job->getParams()['title'] ?? '', 'job_params' => self::makeBlob( $job->getParams() ), // Additional job metadata 'job_timestamp' => $db->timestamp(), diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php index 30ab7e739b..8b5a62ef54 100644 --- a/includes/jobqueue/JobQueueFederated.php +++ b/includes/jobqueue/JobQueueFederated.php @@ -199,7 +199,7 @@ class JobQueueFederated extends JobQueue { * @param HashRing &$partitionRing * @param int $flags * @throws JobQueueError - * @return array List of Job object that could not be inserted + * @return IJobSpecification[] List of Job object that could not be inserted */ protected function tryJobInsertions( array $jobs, HashRing &$partitionRing, $flags ) { $jobsLeft = []; @@ -299,7 +299,7 @@ class JobQueueFederated extends JobQueue { return false; } - protected function doAck( Job $job ) { + protected function doAck( RunnableJob $job ) { $partition = $job->getMetadata( 'QueuePartition' ); if ( $partition === null ) { throw new MWException( "The given job has no defined partition name." ); @@ -308,7 +308,7 @@ class JobQueueFederated extends JobQueue { $this->partitionQueues[$partition]->ack( $job ); } - protected function doIsRootJobOldDuplicate( Job $job ) { + protected function doIsRootJobOldDuplicate( IJobSpecification $job ) { $signature = $job->getRootJobParams()['rootJobSignature']; $partition = $this->partitionRing->getLiveLocation( $signature ); try { diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 4bac304d13..83e5fb24bf 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -234,7 +234,7 @@ class JobQueueGroup { * @param int|string $qtype JobQueueGroup::TYPE_* constant or job type string * @param int $flags Bitfield of JobQueueGroup::USE_* constants * @param array $blacklist List of job types to ignore - * @return Job|bool Returns false on failure + * @return RunnableJob|bool Returns false on failure */ public function pop( $qtype = self::TYPE_DEFAULT, $flags = 0, array $blacklist = [] ) { global $wgJobClasses; diff --git a/includes/jobqueue/JobQueueMemory.php b/includes/jobqueue/JobQueueMemory.php index cbcd4fb28a..cb20a76079 100644 --- a/includes/jobqueue/JobQueueMemory.php +++ b/includes/jobqueue/JobQueueMemory.php @@ -111,7 +111,7 @@ class JobQueueMemory extends JobQueue { /** * @see JobQueue::doPop * - * @return Job|bool + * @return RunnableJob|bool */ protected function doPop() { if ( $this->doGetSize() == 0 ) { @@ -143,9 +143,9 @@ class JobQueueMemory extends JobQueue { /** * @see JobQueue::doAck * - * @param Job $job + * @param RunnableJob $job */ - protected function doAck( Job $job ) { + protected function doAck( RunnableJob $job ) { if ( $this->getAcquiredCount() == 0 ) { return; } @@ -206,11 +206,10 @@ class JobQueueMemory extends JobQueue { /** * @param IJobSpecification $spec - * - * @return Job + * @return RunnableJob */ public function jobFromSpecInternal( IJobSpecification $spec ) { - return Job::factory( $spec->getType(), $spec->getTitle(), $spec->getParams() ); + return $this->factoryJob( $spec->getType(), $spec->getParams() ); } /** diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index 98a5491501..886468826b 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -307,7 +307,7 @@ LUA; /** * @see JobQueue::doPop() - * @return Job|bool + * @return RunnableJob|bool * @throws JobQueueError */ protected function doPop() { @@ -379,12 +379,12 @@ LUA; /** * @see JobQueue::doAck() - * @param Job $job - * @return Job|bool + * @param RunnableJob $job + * @return RunnableJob|bool * @throws UnexpectedValueException * @throws JobQueueError */ - protected function doAck( Job $job ) { + protected function doAck( RunnableJob $job ) { $uuid = $job->getMetadata( 'uuid' ); if ( $uuid === null ) { throw new UnexpectedValueException( "Job of type '{$job->getType()}' has no UUID." ); @@ -463,11 +463,11 @@ LUA; /** * @see JobQueue::doIsRootJobOldDuplicate() - * @param Job $job + * @param IJobSpecification $job * @return bool * @throws JobQueueError */ - protected function doIsRootJobOldDuplicate( Job $job ) { + protected function doIsRootJobOldDuplicate( IJobSpecification $job ) { if ( !$job->hasRootJobParams() ) { return false; // job has no de-deplication info } @@ -627,7 +627,7 @@ LUA; * * @param string $uid * @param RedisConnRef $conn - * @return Job|bool Returns false if the job does not exist + * @return RunnableJob|bool Returns false if the job does not exist * @throws JobQueueError * @throws UnexpectedValueException */ @@ -641,8 +641,10 @@ LUA; if ( !is_array( $item ) ) { // this shouldn't happen throw new UnexpectedValueException( "Could not find job with ID '$uid'." ); } - $title = Title::makeTitle( $item['namespace'], $item['title'] ); - $job = Job::factory( $item['type'], $title, $item['params'] ); + + $params = $item['params']; + $params += [ 'namespace' => $item['namespace'], 'title' => $item['title'] ]; + $job = $this->factoryJob( $item['type'], $params ); $job->setMetadata( 'uuid', $item['uuid'] ); $job->setMetadata( 'timestamp', $item['timestamp'] ); // Add in attempt count for debugging at showJobs.php @@ -684,8 +686,8 @@ LUA; return [ // Fields that describe the nature of the job 'type' => $job->getType(), - 'namespace' => $job->getTitle()->getNamespace(), - 'title' => $job->getTitle()->getDBkey(), + 'namespace' => $job->getParams()['namespace'] ?? NS_SPECIAL, + 'title' => $job->getParams()['title'] ?? '', 'params' => $job->getParams(), // Some jobs cannot run until a "release timestamp" 'rtimestamp' => $job->getReleaseTimestamp() ?: 0, @@ -700,11 +702,13 @@ LUA; /** * @param array $fields - * @return Job|bool + * @return RunnableJob|bool */ protected function getJobFromFields( array $fields ) { - $title = Title::makeTitle( $fields['namespace'], $fields['title'] ); - $job = Job::factory( $fields['type'], $title, $fields['params'] ); + $params = $fields['params']; + $params += [ 'namespace' => $fields['namespace'], 'title' => $fields['title'] ]; + + $job = $this->factoryJob( $fields['type'], $params ); $job->setMetadata( 'uuid', $fields['uuid'] ); $job->setMetadata( 'timestamp', $fields['timestamp'] ); diff --git a/includes/jobqueue/JobSpecification.php b/includes/jobqueue/JobSpecification.php index b04aa83808..80a46d04ba 100644 --- a/includes/jobqueue/JobSpecification.php +++ b/includes/jobqueue/JobSpecification.php @@ -28,8 +28,7 @@ * $job = new JobSpecification( * 'null', * array( 'lives' => 1, 'usleep' => 100, 'pi' => 3.141569 ), - * array( 'removeDuplicates' => 1 ), - * Title::makeTitle( NS_SPECIAL, 'nullity' ) + * array( 'removeDuplicates' => 1 ) * ); * JobQueueGroup::singleton()->push( $job ) * @endcode @@ -63,8 +62,19 @@ class JobSpecification implements IJobSpecification { $this->validateParams( $opts ); $this->type = $type; + if ( $title instanceof Title ) { + // Make sure JobQueue classes can pull the title from parameters alone + if ( $title->getDBkey() !== '' ) { + $params += [ + 'namespace' => $title->getNamespace(), + 'title' => $title->getDBkey() + ]; + } + } else { + $title = Title::makeTitle( NS_SPECIAL, '' ); + } $this->params = $params; - $this->title = $title ?: Title::makeTitle( NS_SPECIAL, 'Blankpage' ); + $this->title = $title; $this->opts = $opts; } diff --git a/includes/jobqueue/RunnableJob.php b/includes/jobqueue/RunnableJob.php new file mode 100644 index 0000000000..e477b12c1e --- /dev/null +++ b/includes/jobqueue/RunnableJob.php @@ -0,0 +1,54 @@ +removeDuplicates = false; // delay semantics are critical } diff --git a/includes/jobqueue/jobs/ClearUserWatchlistJob.php b/includes/jobqueue/jobs/ClearUserWatchlistJob.php index 77adfa1a94..01fa46c002 100644 --- a/includes/jobqueue/jobs/ClearUserWatchlistJob.php +++ b/includes/jobqueue/jobs/ClearUserWatchlistJob.php @@ -10,7 +10,17 @@ use MediaWiki\MediaWikiServices; * @ingroup JobQueue * @since 1.31 */ -class ClearUserWatchlistJob extends Job { +class ClearUserWatchlistJob extends Job implements GenericParameterJob { + /** + * @param array $params + * - userId, The ID for the user whose watchlist is being cleared. + * - maxWatchlistId, The maximum wl_id at the time the job was first created, + */ + public function __construct( array $params ) { + parent::__construct( 'clearUserWatchlist', $params ); + + $this->removeDuplicates = true; + } /** * @param User $user User to clear the watchlist for. @@ -19,26 +29,7 @@ class ClearUserWatchlistJob extends Job { * @return ClearUserWatchlistJob */ public static function newForUser( User $user, $maxWatchlistId ) { - return new self( - null, - [ 'userId' => $user->getId(), 'maxWatchlistId' => $maxWatchlistId ] - ); - } - - /** - * @param Title|null $title Not used by this job. - * @param array $params - * - userId, The ID for the user whose watchlist is being cleared. - * - maxWatchlistId, The maximum wl_id at the time the job was first created, - */ - public function __construct( Title $title = null, array $params ) { - parent::__construct( - 'clearUserWatchlist', - SpecialPage::getTitleFor( 'EditWatchlist', 'clear' ), - $params - ); - - $this->removeDuplicates = true; + return new self( [ 'userId' => $user->getId(), 'maxWatchlistId' => $maxWatchlistId ] ); } public function run() { @@ -101,7 +92,7 @@ class ClearUserWatchlistJob extends Job { if ( count( $watchlistIds ) === (int)$batchSize ) { // Until we get less results than the limit, recursively push // the same job again. - JobQueueGroup::singleton()->push( new self( $this->getTitle(), $this->getParams() ) ); + JobQueueGroup::singleton()->push( new self( $this->getParams() ) ); } return true; diff --git a/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php b/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php index 3b2c899012..f53174a573 100644 --- a/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php +++ b/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php @@ -33,9 +33,9 @@ use MediaWiki\MediaWikiServices; * @ingroup JobQueue * @since 1.31 */ -class ClearWatchlistNotificationsJob extends Job { - function __construct( Title $title, array $params ) { - parent::__construct( 'clearWatchlistNotifications', $title, $params ); +class ClearWatchlistNotificationsJob extends Job implements GenericParameterJob { + function __construct( array $params ) { + parent::__construct( 'clearWatchlistNotifications', $params ); static $required = [ 'userId', 'casTime' ]; $missing = implode( ', ', array_diff( $required, array_keys( $this->params ) ) ); diff --git a/includes/jobqueue/jobs/DeletePageJob.php b/includes/jobqueue/jobs/DeletePageJob.php index e6dfae497e..b0ce6a5d69 100644 --- a/includes/jobqueue/jobs/DeletePageJob.php +++ b/includes/jobqueue/jobs/DeletePageJob.php @@ -3,16 +3,13 @@ /** * Class DeletePageJob */ -class DeletePageJob extends Job { - public function __construct( $title, $params = [] ) { - parent::__construct( 'deletePage', $title, $params ); +class DeletePageJob extends Job implements GenericParameterJob { + public function __construct( array $params ) { + parent::__construct( 'deletePage', $params ); + + $this->title = Title::makeTitle( $params['namespace'], $params['title'] ); } - /** - * Execute the job - * - * @return bool - */ public function run() { // Failure to load the page is not job failure. // A parallel deletion operation may have already completed the page deletion. diff --git a/includes/jobqueue/jobs/DuplicateJob.php b/includes/jobqueue/jobs/DuplicateJob.php index c005a29a8b..4231e1563e 100644 --- a/includes/jobqueue/jobs/DuplicateJob.php +++ b/includes/jobqueue/jobs/DuplicateJob.php @@ -26,29 +26,28 @@ * * @ingroup JobQueue */ -final class DuplicateJob extends Job { +final class DuplicateJob extends Job implements GenericParameterJob { /** * Callers should use DuplicateJob::newFromJob() instead * - * @param Title $title * @param array $params Job parameters */ - function __construct( Title $title, array $params ) { - parent::__construct( 'duplicate', $title, $params ); + function __construct( array $params ) { + parent::__construct( 'duplicate', $params ); } /** * Get a duplicate no-op version of a job * - * @param Job $job + * @param RunnableJob $job * @return Job */ - public static function newFromJob( Job $job ) { - $djob = new self( $job->getTitle(), $job->getParams() ); + public static function newFromJob( RunnableJob $job ) { + $djob = new self( $job->getParams() ); $djob->command = $job->getType(); $djob->params = is_array( $djob->params ) ? $djob->params : []; $djob->params = [ 'isDuplicate' => true ] + $djob->params; - $djob->metadata = $job->metadata; + $djob->metadata = $job->getMetadata(); return $djob; } diff --git a/includes/jobqueue/jobs/EnqueueJob.php b/includes/jobqueue/jobs/EnqueueJob.php index 72923ce755..f9735d53c1 100644 --- a/includes/jobqueue/jobs/EnqueueJob.php +++ b/includes/jobqueue/jobs/EnqueueJob.php @@ -32,15 +32,14 @@ * @ingroup JobQueue * @since 1.25 */ -final class EnqueueJob extends Job { +final class EnqueueJob extends Job implements GenericParameterJob { /** * Callers should use the factory methods instead * - * @param Title $title * @param array $params Job parameters */ - function __construct( Title $title, array $params ) { - parent::__construct( 'enqueue', $title, $params ); + public function __construct( array $params ) { + parent::__construct( 'enqueue', $params ); } /** @@ -75,10 +74,7 @@ final class EnqueueJob extends Job { } } - $eJob = new self( - Title::makeTitle( NS_SPECIAL, 'Badtitle/' . __CLASS__ ), - [ 'jobsByDomain' => $jobMapsByDomain ] - ); + $eJob = new self( [ 'jobsByDomain' => $jobMapsByDomain ] ); // If *all* jobs to be pushed are to be de-duplicated (a common case), then // de-duplicate this whole job itself to avoid build up in high traffic cases $eJob->removeDuplicates = $deduplicate; diff --git a/includes/jobqueue/jobs/NullJob.php b/includes/jobqueue/jobs/NullJob.php index 80826fe112..01afe6f040 100644 --- a/includes/jobqueue/jobs/NullJob.php +++ b/includes/jobqueue/jobs/NullJob.php @@ -31,7 +31,7 @@ * @code * $ php maintenance/eval.php * > $queue = JobQueueGroup::singleton(); - * > $job = new NullJob( Title::newMainPage(), [ 'lives' => 10 ] ); + * > $job = new NullJob( [ 'lives' => 10 ] ); * > $queue->push( $job ); * @endcode * You can then confirm the job has been enqueued by using the showJobs.php @@ -44,13 +44,12 @@ * * @ingroup JobQueue */ -class NullJob extends Job { +class NullJob extends Job implements GenericParameterJob { /** - * @param Title $title * @param array $params Job parameters (lives, usleep) */ - function __construct( Title $title, array $params ) { - parent::__construct( 'null', $title, $params ); + function __construct( array $params ) { + parent::__construct( 'null', $params ); if ( !isset( $this->params['lives'] ) ) { $this->params['lives'] = 1; } @@ -67,7 +66,7 @@ class NullJob extends Job { if ( $this->params['lives'] > 1 ) { $params = $this->params; $params['lives']--; - $job = new self( $this->title, $params ); + $job = new self( $params ); JobQueueGroup::singleton()->push( $job ); } diff --git a/includes/jobqueue/jobs/UserGroupExpiryJob.php b/includes/jobqueue/jobs/UserGroupExpiryJob.php index bd0df5b276..ac8f94ab50 100644 --- a/includes/jobqueue/jobs/UserGroupExpiryJob.php +++ b/includes/jobqueue/jobs/UserGroupExpiryJob.php @@ -21,9 +21,9 @@ * @ingroup JobQueue */ -class UserGroupExpiryJob extends Job { - public function __construct( $params = [] ) { - parent::__construct( 'userGroupExpiry', Title::newMainPage(), $params ); +class UserGroupExpiryJob extends Job implements GenericParameterJob { + public function __construct( array $params = [] ) { + parent::__construct( 'userGroupExpiry', $params ); $this->removeDuplicates = true; } diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 96ed8ee470..931740ca80 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2736,6 +2736,8 @@ class WikiPage implements Page, IDBAccessObject { $dbw->endAtomic( __METHOD__ ); $jobParams = [ + 'namespace' => $this->getTitle()->getNamespace(), + 'title' => $this->getTitle()->getDBkey(), 'wikiPageId' => $id, 'requestId' => $webRequestId ?? WebRequest::getRequestId(), 'reason' => $reason, @@ -2745,7 +2747,7 @@ class WikiPage implements Page, IDBAccessObject { 'logsubtype' => $logsubtype, ]; - $job = new DeletePageJob( $this->getTitle(), $jobParams ); + $job = new DeletePageJob( $jobParams ); JobQueueGroup::singleton()->push( $job ); $status->warning( 'delete-scheduled', diff --git a/includes/specialpage/SpecialPageFactory.php b/includes/specialpage/SpecialPageFactory.php index 58212dd9d5..a3b7296fec 100644 --- a/includes/specialpage/SpecialPageFactory.php +++ b/includes/specialpage/SpecialPageFactory.php @@ -34,6 +34,7 @@ use RequestContext; use SpecialPage; use Title; use User; +use Wikimedia\Assert\Assert; /** * Factory for handling the special page list and generating SpecialPage objects. @@ -215,17 +216,36 @@ class SpecialPageFactory { private $aliases; /** @var Config */ - private $config; + private $options; /** @var Language */ private $contLang; /** - * @param Config $config + * TODO Make this a const when HHVM support is dropped (T192166) + * + * @var array + * @since 1.33 + * */ + public static $constructorOptions = [ + 'ContentHandlerUseDB', + 'DisableInternalSearch', + 'EmailAuthentication', + 'EnableEmail', + 'EnableJavaScriptTest', + 'PageLanguageUseDB', + 'SpecialPages', + ]; + + /** + * @param array $options * @param Language $contLang */ - public function __construct( Config $config, Language $contLang ) { - $this->config = $config; + public function __construct( array $options, Language $contLang ) { + Assert::parameter( count( $options ) === count( self::$constructorOptions ) && + !array_diff( self::$constructorOptions, array_keys( $options ) ), + '$options', 'Wrong set of options present' ); + $this->options = $options; $this->contLang = $contLang; } @@ -248,32 +268,32 @@ class SpecialPageFactory { if ( !is_array( $this->list ) ) { $this->list = self::$coreList; - if ( !$this->config->get( 'DisableInternalSearch' ) ) { + if ( !$this->options['DisableInternalSearch'] ) { $this->list['Search'] = \SpecialSearch::class; } - if ( $this->config->get( 'EmailAuthentication' ) ) { + if ( $this->options['EmailAuthentication'] ) { $this->list['Confirmemail'] = \EmailConfirmation::class; $this->list['Invalidateemail'] = \EmailInvalidation::class; } - if ( $this->config->get( 'EnableEmail' ) ) { + if ( $this->options['EnableEmail'] ) { $this->list['ChangeEmail'] = \SpecialChangeEmail::class; } - if ( $this->config->get( 'EnableJavaScriptTest' ) ) { + if ( $this->options['EnableJavaScriptTest'] ) { $this->list['JavaScriptTest'] = \SpecialJavaScriptTest::class; } - if ( $this->config->get( 'PageLanguageUseDB' ) ) { + if ( $this->options['PageLanguageUseDB'] ) { $this->list['PageLanguage'] = \SpecialPageLanguage::class; } - if ( $this->config->get( 'ContentHandlerUseDB' ) ) { + if ( $this->options['ContentHandlerUseDB'] ) { $this->list['ChangeContentModel'] = \SpecialChangeContentModel::class; } // Add extension special pages - $this->list = array_merge( $this->list, $this->config->get( 'SpecialPages' ) ); + $this->list = array_merge( $this->list, $this->options['SpecialPages'] ); // This hook can be used to disable unwanted core special pages // or conditionally register special pages. diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 391d9abfd8..2632092cd9 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -206,6 +206,7 @@ class SpecialVersion extends SpecialPage { 'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine Musso', 'Timo Tijhof', 'Daniel Kinzler', 'Jeroen De Dauw', 'Brad Jorsch', 'Bartosz Dziewoński', 'Ed Sanders', 'Moriel Schottlender', + 'Kunal Mehta', 'James D. Forrester', 'Brian Wolff', 'Adam Shorland', $othersLink, $translatorsLink ]; diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index 8aca689a24..e287a35525 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -904,10 +904,9 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac } // If the page is watched by the user (or may be watched), update the timestamp - $job = new ClearWatchlistNotificationsJob( - $user->getUserPage(), - [ 'userId' => $user->getId(), 'timestamp' => $timestamp, 'casTime' => time() ] - ); + $job = new ClearWatchlistNotificationsJob( [ + 'userId' => $user->getId(), 'timestamp' => $timestamp, 'casTime' => time() + ] ); // Try to run this post-send // Calls DeferredUpdates::addCallableUpdate in normal operation diff --git a/languages/i18n/ast.json b/languages/i18n/ast.json index b66914bb12..77a312a31d 100644 --- a/languages/i18n/ast.json +++ b/languages/i18n/ast.json @@ -653,7 +653,7 @@ "accmailtext": "Unvióse a $2 una contraseña xenerada al debalu pal usuariu [[User talk:$1|$1]]. Pue camudase na páxina ''[[Special:ChangePassword|camudar contraseña]]'' depués d'aniciar sesión.", "newarticle": "(Nuevu)", "newarticletext": "Siguisti un enllaz a un artículu qu'inda nun esiste.\nPa crear la páxina, empecipia a escribir nel cuadru d'embaxo (mira la [$1 páxina d'ayuda] pa más información).\nSi llegasti equí por enquivocu, calca nel botón atrás del to restolador.", - "anontalkpagetext": "----\n''Esta ye la páxina d'alderique pa un usuariu anónimu qu'inda nun creó una cuenta o que nun la usa.''\nPola mor d'ello ha usase la direición numbérica IP pa identificalu/la.\nTala IP pue compartise por varios usuarios.\nSi yes un usuariu anónimu y notes qu'hai comentarios irrelevantes empobinaos pa ti, por favor [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|anicia sesiín]] pa torgar futures confusiones con otros usuarios anónimos.", + "anontalkpagetext": "----\nEsta ye la páxina d'alderique pa un usuariu anónimu qu'inda nun creó una cuenta o que nun la usa.\nPola mor d'ello ha usase la direición numbérica IP como identificación.\nTala IP pué compartise por dellos usuarios.\nSi yes un usuariu anónimu y notes qu'hai comentarios ensin relevancia dirixíos pa ti, por favor [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|anicia sesión]] pa torgar futures confusiones con otros usuarios anónimos.", "noarticletext": "Nestos momentos nun hai testu nesta páxina.\nPuedes [[Special:Search/{{PAGENAME}}|buscar esti títulu de páxina]] n'otres páxines,\n[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar los rexistros rellacionaos],\no [{{fullurl:{{FULLPAGENAME}}|action=edit}} crear esta páxina].", "noarticletext-nopermission": "Nestos momentos nun hai testu nesta páxina.\nPuedes [[Special:Search/{{PAGENAME}}|buscar esti títulu de páxina]] n'otres páxines o [{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar los rexistros rellacionaos], pero nun tienes permisu pa crear esta páxina.", "missing-revision": "La revisión #$1 de la páxina llamada \"{{FULLPAGENAME}}\" nun esiste.\n\nDe vezu la causa d'esto ye siguir un enllaz antiguu del historial a una páxina que se desanició.\nSe puen alcontrar más detalles nel [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} rexistru de desanicios].", diff --git a/languages/i18n/be-tarask.json b/languages/i18n/be-tarask.json index cfe53713fa..7a5b6e0c59 100644 --- a/languages/i18n/be-tarask.json +++ b/languages/i18n/be-tarask.json @@ -2235,7 +2235,7 @@ "delete-confirm": "Выдаліць «$1»", "delete-legend": "Выдаліць", "historywarning": "Папярэджаньне: старонка, якую Вы зьбіраецеся выдаліць, мае гісторыю з $1 {{PLURAL:$1|вэрсіі|вэрсіяў|вэрсіяў}}:", - "historyaction-submit": "Паказаць", + "historyaction-submit": "Паказаць вэрсіі", "confirmdeletetext": "Зараз Вы выдаліце старонку разам з усёй гісторыяй зьменаў.\nКалі ласка, пацьвердзіце, што Вы зьбіраецеся гэта зрабіць і што Вы разумееце ўсе наступствы, а таксама робіце гэта ў адпаведнасьці з [[{{MediaWiki:Policy-url}}|правіламі]].", "actioncomplete": "Дзеяньне выкананае", "actionfailed": "Дзеяньне ня выкананае", diff --git a/languages/i18n/cs.json b/languages/i18n/cs.json index a39d2bee72..6dfc1608b0 100644 --- a/languages/i18n/cs.json +++ b/languages/i18n/cs.json @@ -2261,7 +2261,7 @@ "delete-confirm": "Smazání stránky „$1“", "delete-legend": "Smazat", "historywarning": "Varování: Stránka, kterou se chystáte smazat, má historii s $1 {{PLURAL:$1|revizí|revizemi}}:", - "historyaction-submit": "Zobrazit", + "historyaction-submit": "Zobrazit revize", "confirmdeletetext": "Chystáte se smazat stránku s celou její historií. Prosím potvrďte, že to opravdu chcete učinit, že si uvědomujete důsledky a že je to v souladu s [[{{MediaWiki:Policy-url}}|pravidly]].", "actioncomplete": "Provedeno", "actionfailed": "Operace se nezdařila", diff --git a/languages/i18n/de.json b/languages/i18n/de.json index 9612ca7327..4bcd9a1c4a 100644 --- a/languages/i18n/de.json +++ b/languages/i18n/de.json @@ -2320,7 +2320,7 @@ "delete-confirm": "Löschen von „$1“", "delete-legend": "Löschen", "historywarning": "Achtung: Die Seite, die du löschen möchtest, hat eine Versionsgeschichte mit {{PLURAL:$1|einer Version|$1 Versionen}}:", - "historyaction-submit": "Anzeigen", + "historyaction-submit": "Versionen anzeigen", "confirmdeletetext": "Du bist dabei, eine Seite mit allen zugehörigen älteren Versionen zu löschen. Bitte bestätige dazu, dass du dir der Konsequenzen bewusst bist, und dass du in Übereinstimmung mit den [[{{MediaWiki:Policy-url}}|Richtlinien]] handelst.", "actioncomplete": "Aktion beendet", "actionfailed": "Aktion fehlgeschlagen", diff --git a/languages/i18n/diq.json b/languages/i18n/diq.json index 9510e960d7..dd50dea412 100644 --- a/languages/i18n/diq.json +++ b/languages/i18n/diq.json @@ -611,8 +611,8 @@ "watchthis": "Na pele de seyr ke", "savearticle": "Pele qeyd ke", "savechanges": "Vurnayışan qeyd ke", - "publishpage": "Pele neşr kerê", - "publishchanges": "Vırnayışan qeyd ke", + "publishpage": "Pele qeyd ke", + "publishchanges": "Vurnayışan qeyd ke", "savearticle-start": "Pele qeyd ke...", "savechanges-start": "Vurnayışan qeyd ke...", "publishpage-start": "Pele weşane...", @@ -768,7 +768,7 @@ "page_first": "verên", "page_last": "peyên", "histlegend": "Ferqê weçinayışi: Qutiya versiyonan qandé têversanayış işaret ke u dest be ''enter''i ya zi gocega cêrêne rone.
\nCetwel: ({{int:ferq}}) = ferqê versiyonê peyêni, ({{int:peyên}}) = ferqê versiyonê verêni, {{int:q}} = vırnayışo werdiyo.", - "history-fieldset-title": "Çım ra viyarnayışan cı geyre", + "history-fieldset-title": "Çımraviyarnayışan cı geyre", "history-show-deleted": "Tenya çımraviyarnayışanê esterıteyan bımocne", "histfirst": "Verênêr", "histlast": "Peyênêr", @@ -2056,7 +2056,7 @@ "delete-confirm": "\"$1\" bestere", "delete-legend": "Bestere", "historywarning": "'''Teme:''' Pela ke şıma esterenê tede yew viyarte be teqriben $1 {{PLURAL:$1|versiyon esto|versiyoni estê}}:", - "historyaction-submit": "Bımocne", + "historyaction-submit": "Versiyonan bımocne", "confirmdeletetext": "Tı ho yew pele u tarixê pele wederneno.\nTı ra rica keno, tı zani tı ho sekeno, tı zani neticeyanê eno wedarnayışi u tı zani tı ser [[{{MediaWiki:Policy-url}}|poliçe]] kar keno.", "actioncomplete": "Kar bi temam", "actionfailed": "kar nêbı", @@ -2589,7 +2589,7 @@ "tooltip-ca-nstab-category": "Pela kategoriye bıvêne", "tooltip-minoredit": "Ney vırnayışo werdi nışan bıkerê", "tooltip-save": "Vurnayışanê xo qeyd ke", - "tooltip-publish": "Vurnayışê xo neşr kerê", + "tooltip-publish": "Vurnayışê xo qeyd ke", "tooltip-preview": "Vurnayışanê xo çım ra bıviyarnê. Qeydkerdış ra ver bıgurê cı!", "tooltip-diff": "Kamci vırnayışê ke şıma nuştey sero kerdê, inan bıvênê.", "tooltip-compareselectedversions": "Ena per de ferqê rewziyonan de dı weçinaya bıvinê", diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 197499cde8..e5b74feb05 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -848,7 +848,7 @@ "page_first": "first", "page_last": "last", "histlegend": "Diff selection: Mark the radio boxes of the revisions to compare and hit enter or the button at the bottom.
\nLegend: ({{int:cur}}) = difference with latest revision, ({{int:last}}) = difference with preceding revision, {{int:minoreditletter}} = minor edit.", - "history-fieldset-title": "Search for revisions", + "history-fieldset-title": "Filter revisions", "history-show-deleted": "Revision deleted only", "history_copyright": "-", "histfirst": "oldest", diff --git a/languages/i18n/es.json b/languages/i18n/es.json index 72a383e9ab..5078817e7f 100644 --- a/languages/i18n/es.json +++ b/languages/i18n/es.json @@ -2581,6 +2581,7 @@ "mycontris": "Contribuciones", "anoncontribs": "Contribuciones", "contribsub2": "Para {{GENDER:$3|$1}} ($2)", + "contributions-subtitle": "Para {{GENDER:$3|$1}} ($2)", "contributions-userdoesnotexist": "La cuenta de usuario «$1» no está registrada.", "negative-namespace-not-supported": "Los espacios de nombres con valores negativos no están permitidos", "nocontribs": "No se encontraron cambios que cumplieran estos criterios.", diff --git a/languages/i18n/fi.json b/languages/i18n/fi.json index 4bf08f299b..d64121d56b 100644 --- a/languages/i18n/fi.json +++ b/languages/i18n/fi.json @@ -344,7 +344,7 @@ "nstab-category": "Luokka", "mainpage-nstab": "Etusivu", "nosuchaction": "Toimintoa ei ole olemassa", - "nosuchactiontext": "URL:ssä määritelty toiminto ei ole kelvollinen.\nOlet saattanut kirjoittaa URL:in väärin tai olet seurannut virheellistä linkkiä.\nKyseessä voi myös mahdollisesti olla virhe sivuston {{SITENAME}} käyttämässä ohjelmistossa.", + "nosuchactiontext": "URL:ssä määritelty toiminto ei ole kelvollinen.\nOlet saattanut kirjoittaa URL:in väärin tai olet seurannut virheellistä linkkiä.\nKyseessä voi myös mahdollisesti olla virhe {{GRAMMAR:genitive|{{SITENAME}}}} käyttämässä ohjelmistossa.", "nosuchspecialpage": "Kyseistä toimintosivua ei ole", "nospecialpagetext": "Ohjelmisto ei tunnista pyytämääsi toimintosivua.\n\nLuettelo toimintosivuista löytyy sivulta [[Special:SpecialPages|{{int:specialpages}}]].", "error": "Virhe", @@ -619,7 +619,7 @@ "passwordreset-email": "Sähköpostiosoite:", "passwordreset-emailtitle": "Tunnuksen tiedot {{GRAMMAR:inessive|{{SITENAME}}}}", "passwordreset-emailtext-ip": "Joku (todennäköisesti sinä, IP-osoitteesta $1) pyysi salasanasi\nvaihtamista sivustolla {{SITENAME}} ($4). {{PLURAL:$3|Seuraava käyttäjätunnus on|Seuraavat käyttäjätunnukset ovat}}\nyhdistettynä tähän sähköpostiosoitteeseen:\n\n$2\n\n{{PLURAL:$3|Tämä väliaikainen salasana vanhentuu|Nämä väliaikaiset salasanat vanhentuvat}} {{PLURAL:$5|yhden päivän|$5 päivän}} kuluttua.\nKirjaudu sisään nyt ja valitse uusi salasana heti. Jos joku toinen teki tämän pyynnön \ntai jos muistitkin vanhan salasanasi etkä halua enää muuttaa sitä,\nvoit jättää tämän viestin huomiotta ja jatkaa vanhan salasanasi käyttämistä.", - "passwordreset-emailtext-user": "Käyttäjä $1 pyysi muistutusta tunnuksesi tiedoista sivustolla {{SITENAME}} ($4).\n{{PLURAL:$3|Seuraava käyttäjätunnus on|Seuraavat käyttäjätunnukset ovat}} liitetty tähän sähköpostiosoitteeseen:\n\n$2\n\n{{PLURAL:$3|Tämä väliaikainen salasana vanhentuu|Nämä väliaikaiset salasanat vanhentuvat}} {{PLURAL:$5|yhden päivän|$5 päivän}} kuluttua.\nSinun kannattaa kirjautua sisään ja valita uusi salasana. Jos joku toinen teki tämän\npyynnön, tai muistat sittenkin vanhan salasanasi, etkä halua muuttaa sitä,\nvoit jättää tämän viestin huomiotta ja jatkaa vanhan salasanan käyttöä.", + "passwordreset-emailtext-user": "Käyttäjä $1 pyysi muistutusta tunnuksesi tiedoista {{GRAMMAR:inessive|{{SITENAME}}}} ($4).\n{{PLURAL:$3|Seuraava käyttäjätunnus on|Seuraavat käyttäjätunnukset ovat}} liitetty tähän sähköpostiosoitteeseen:\n\n$2\n\n{{PLURAL:$3|Tämä väliaikainen salasana vanhentuu|Nämä väliaikaiset salasanat vanhentuvat}} {{PLURAL:$5|yhden päivän|$5 päivän}} kuluttua.\nSinun kannattaa kirjautua sisään ja valita uusi salasana. Jos joku toinen teki tämän\npyynnön, tai muistat sittenkin vanhan salasanasi, etkä halua muuttaa sitä,\nvoit jättää tämän viestin huomiotta ja jatkaa vanhan salasanan käyttöä.", "passwordreset-emailelement": "Käyttäjätunnus: \n$1\n\nVäliaikainen salasana: \n$2", "passwordreset-emailsentemail": "Jos tämä on sinun tunnuksellesi rekisteröity sähköpostiosoite, salasanan uudistamisesta kertova viesti lähetetään.", "passwordreset-emailsentusername": "Jos on olemassa vastaava rekisteröity sähköpostiosoite, salasanan uudistamisesta kertova viesti lähetetään.", @@ -732,7 +732,7 @@ "continue-editing": "Siirry muokkauskenttään", "previewconflict": "Tämä esikatselu näyttää miltä muokkausalueella oleva teksti näyttää tallennettuna.", "session_fail_preview": "Muokkaustasi ei voitu tallentaa, koska istuntosi tiedot ovat kadonneet.\n\nSaatat olla kirjautunut ulos. '''Varmista, että olet edelleen kirjautunut sisään ja yritä uudelleen'''. Jos ongelma ei katoa, yritä [[Special:UserLogout|kirjautua ulos]] ja takaisin sisään, ja varmista, että selaimesi sallii evästeet tältä sivustolta.", - "session_fail_preview_html": "Valitettavasti muokkaustasi ei voitu käsitellä istunnon tietojen katoamisen vuoksi.\n\nKoska sivustolla {{SITENAME}} on käytössä suodattamaton HTML-koodi, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi\n\nJos tämä on oikea muokkausyritys, yritä uudelleen. Jos ongelma ei katoa, yritä [[Special:UserLogout|kirjautua ulos]] ja takaisin sisään. Tarkista myös, että selaimesi sallii evästeet tältä sivustolta.", + "session_fail_preview_html": "Valitettavasti muokkaustasi ei voitu käsitellä istunnon tietojen katoamisen vuoksi.\n\nKoska {{GRAMMAR:inessive|{{SITENAME}}}} on käytössä suodattamaton HTML-koodi, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi\n\nJos tämä on oikea muokkausyritys, yritä uudelleen. Jos ongelma ei katoa, yritä [[Special:UserLogout|kirjautua ulos]] ja takaisin sisään. Tarkista myös, että selaimesi sallii evästeet tältä sivustolta.", "token_suffix_mismatch": "'''Muokkauksesi on hylätty, koska asiakasohjelmasi ei osaa käsitellä välimerkkejä muokkaustarkisteessa. Syynä voi olla viallinen välityspalvelin.'''", "edit_form_incomplete": "'''Osa muokkauslomakkeesta ei saavuttanut palvelinta. Tarkista, että muokkauksesi ovat vahingoittumattomia ja yritä uudelleen.'''", "editing": "Muokataan sivua $1", @@ -1707,11 +1707,11 @@ "upload-form-label-infoform-categories": "Luokat", "upload-form-label-infoform-date": "Päivämäärä", "upload-form-label-own-work-message-generic-local": "Vakuutan, että tallennan tämän tiedoston noudattaen {{GRAMMAR:inessive|{{SITENAME}}}} voimassa olevia käyttöehtoja sekä lisenssejä koskevia käytäntöjä.", - "upload-form-label-not-own-work-message-generic-local": "Jos et kykene tallentamaan tätä tiedostoa noudattaen niitä käytäntöjä, jotka ovat voimassa sivustolla {{SITENAME}}, sulje tämä dialogi ja kokeile jotain toista menetelmää.", + "upload-form-label-not-own-work-message-generic-local": "Jos et kykene tallentamaan tätä tiedostoa noudattaen niitä käytäntöjä, jotka ovat voimassa {{GRAMMAR:inessive|{{SITENAME}}}}, sulje tämä dialogi ja kokeile jotain toista menetelmää.", "upload-form-label-not-own-work-local-generic-local": "Voit myös kokeilla [[Special:Upload|yleistä tallentamista]].", "upload-form-label-own-work-message-generic-foreign": "Ymmärrän, että olen tallentamassa tätä tiedostoa yhteiseen mediasäilöön. Vakuutan, että teen tämän noudattaen asiaankuuluvia käyttöehtoja ja lisenssejä koskevia käytäntöjä.", "upload-form-label-not-own-work-message-generic-foreign": "Jos et kykene tallentamaan tätä tiedostoa noudattaen niitä käytäntöjä, jotka ovat voimassa yhteisessä mediasäilössä, sulje tämä dialogi ja kokeile jotain toista menetelmää.", - "upload-form-label-not-own-work-local-generic-foreign": "Voit myös kokeilla [[Special:Upload|tallennussivua sivustolla {{SITENAME}}]]. Saattaa olla, että tämän tiedoston tallentaminen sinne on mahdollista siellä voimassa olevien käytäntöjen mukaisesti.", + "upload-form-label-not-own-work-local-generic-foreign": "Voit myös kokeilla [[Special:Upload|tallennussivua {{GRAMMAR:inessive|{{SITENAME}}}}]]. Saattaa olla, että tämän tiedoston tallentaminen sinne on mahdollista siellä voimassa olevien käytäntöjen mukaisesti.", "backend-fail-stream": "Tiedoston $1 virtauttaminen epäonnistui.", "backend-fail-backup": "Tiedostoa $1 ei voitu varmuuskopioida.", "backend-fail-notexists": "Tiedostoa $1 ei ole olemassa.", @@ -2211,7 +2211,7 @@ "emailccsubject": "Kopio lähettämästäsi viestistä osoitteeseen $1: $2", "emailsent": "Sähköposti lähetetty", "emailsenttext": "Sähköpostiviestisi on lähetetty.", - "emailuserfooter": "Tämän sähköpostin {{GENDER:$1|lähetti}} $1 vastaanottajalle {{GENDER:$2|$2}} käyttämällä ”{{int:emailuser}}” -toimintoa {{GRAMMAR:inessive|{{SITENAME}}}}. Jos vastaat tähän sähköpostiin, sinun sähköpostiviestisi lähetetään suoraan {{GENDER:$1|alkuperäiselle lähettäjälle}} ja samalla paljastetaan {{GENDER:$2|sinun}} sähköpostiosoitteesi {{GENDER:$1|hänelle}}.", + "emailuserfooter": "Tämän sähköpostin {{GENDER:$1|lähetti}} $1 vastaanottajalle {{GENDER:$2|$2}} käyttämällä ”{{int:emailuser}}” -toimintoa {{GRAMMAR:inessive|{{SITENAME}}}}. Jos vastaat tähän sähköpostiin, sähköpostiviestisi lähetetään suoraan {{GENDER:$1|alkuperäiselle lähettäjälle}} ja samalla paljastetaan {{GENDER:$2|sinun}} sähköpostiosoitteesi {{GENDER:$1|hänelle}}.", "usermessage-summary": "Jätetään järjestelmäviesti.", "usermessage-editor": "Järjestelmäviestittäjä", "watchlist": "Tarkkailulista", @@ -2298,7 +2298,7 @@ "deletereason-dropdown": "* Yleiset poistosyyt\n** Spam tai mainossivu\n** Vandalismi\n** Tekijänoikeusrikkomus\n** Sivun tekijän pyyntö\n** Virheellinen ohjaus", "delete-edit-reasonlist": "Muokkaa poistosyitä", "delete-toobig": "Tällä sivulla on pitkä muokkaushistoria, yli $1 {{PLURAL:$1|versio|versiota}}. \nTämänkaltaisten sivujen poistamista on rajoitettu. Tällä ehkäistään {{GRAMMAR:genitive|{{SITENAME}}}} vaurioitumista tahattomasti.", - "delete-warning-toobig": "Tällä sivulla on pitkä muutoshistoria – yli $1 {{PLURAL:$1|versio|versiota}}. Näin suurien muutoshistorioiden poistaminen voi haitata sivuston suorituskykyä.", + "delete-warning-toobig": "Tällä sivulla on pitkä muutoshistoria – yli $1 {{PLURAL:$1|versio|versiota}}. Näin suurien muutoshistorioiden poistaminen voi haitata {{GRAMMAR:genitive|{{SITENAME}}}} suorituskykyä.", "deleteprotected": "Et voi poistaa tätä sivua, koska se on suojattu.", "deleting-backlinks-warning": "Varoitus: Sivulle, jota olet poistamassa, johtaa [[Special:WhatLinksHere/{{FULLPAGENAME}}|linkkejä muilta sivuilta]], taikka sivu on sisällytetty muuhun sivuun.", "deleting-subpages-warning": "Varoitus: Sivu jota olet poistamassa on [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|alasivu|$1 alasivua|51=yli 50 alasivua}}]].", @@ -3070,8 +3070,8 @@ "invalidateemail": "Sähköpostiosoitteen varmennuksen peruuttaminen", "notificationemail_subject_changed": "{{GRAMMAR:genitive|{{SITENAME}}}} rekisteröity sähköpostiosoite on vaihdettu", "notificationemail_subject_removed": "{{GRAMMAR:genitive|{{SITENAME}}}} rekisteröity sähköpostiosoite on poistettu", - "notificationemail_body_changed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on vaihtanut tunnuksen ”$2” sähköpostiosoitteeksi ”$3” sivustolla {{SITENAME}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.", - "notificationemail_body_removed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on poistanut tunnuksen ”$2” sähköpostiosoitteen sivustolla {{SITENAME}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.", + "notificationemail_body_changed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on vaihtanut tunnuksen ”$2” sähköpostiosoitteeksi ”$3” {{GRAMMAR:inessive|{{SITENAME}}}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.", + "notificationemail_body_removed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on poistanut tunnuksen ”$2” sähköpostiosoitteen {{GRAMMAR:inessive|{{SITENAME}}}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.", "scarytranscludedisabled": "[Wikienvälinen sisällytys ei ole käytössä]", "scarytranscludefailed": "[Mallineen hakeminen epäonnistui: $1]", "scarytranscludefailed-httpstatus": "[Mallineen hakeminen epäonnistui: $1 HTTP $2]", @@ -3571,8 +3571,8 @@ "expand_templates_generate_xml": "Näytä XML-jäsennyspuu", "expand_templates_generate_rawhtml": "Näytä raaka HTML", "expand_templates_preview": "Esikatselu", - "expand_templates_preview_fail_html": "Koska sivustolla {{SITENAME}} on käytössä suodattamaton HTML-koodi ja koska istunnon tiedot ovat kadonneet, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi.\n\nJos yritit esikatsella sivua, yritä uudestaan.\nJos esikatselu ei vieläkään toimi, yritä [[Special:UserLogout|kirjautua ulos]] ja sitten kirjautua uudestaan sisään. Tarkista myös, että selaimesi sallii evästeet tältä sivustolta.", - "expand_templates_preview_fail_html_anon": "Koska sivustolla {{SITENAME}} on käytössä puhdas HTML-koodi ja koska et ole kirjautunut sisään, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi.\n\nJos olet oikealla asialla, [[Special:UserLogin|kirjaudu sisään]] ja yritä uudestaan.", + "expand_templates_preview_fail_html": "Koska {{GRAMMAR:inessive|{{SITENAME}}}} on käytössä suodattamaton HTML-koodi ja koska istunnon tiedot ovat kadonneet, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi.\n\nJos yritit esikatsella sivua, yritä uudestaan.\nJos esikatselu ei vieläkään toimi, yritä [[Special:UserLogout|kirjautua ulos]] ja sitten kirjautua uudestaan sisään. Tarkista myös, että selaimesi sallii evästeet tältä sivustolta.", + "expand_templates_preview_fail_html_anon": "Koska {{GRAMMAR:inessive|{{SITENAME}}}} on käytössä puhdas HTML-koodi ja et ole kirjautunut sisään, esikatselu on piilotettu JavaScript-hyökkäyksien torjumiseksi.\n\nJos olet oikealla asialla, [[Special:UserLogin|kirjaudu sisään]] ja yritä uudestaan.", "expand_templates_input_missing": "Sinun on annettava ainakin jotakin wikitekstiä syötteeksi.", "pagelanguage": "Sivun kielen vaihto", "pagelang-name": "Sivu", diff --git a/languages/i18n/fr.json b/languages/i18n/fr.json index 6826cf6571..84ba5a1487 100644 --- a/languages/i18n/fr.json +++ b/languages/i18n/fr.json @@ -2409,7 +2409,7 @@ "delete-confirm": "Supprimer « $1 »", "delete-legend": "Supprimer", "historywarning": "Attention : la page que vous êtes sur le point de supprimer a un historique avec $1 {{PLURAL:$1|version|versions}} :", - "historyaction-submit": "Lister", + "historyaction-submit": "Afficher les révisions", "confirmdeletetext": "Vous êtes sur le point de supprimer une page ou un fichier, ainsi que toutes ses versions antérieures historisées. Veuillez confirmer que c’est bien là ce que vous voulez faire, que vous en comprenez les conséquences et que vous faites ceci en accord avec les [[{{MediaWiki:Policy-url}}|règles internes]].", "actioncomplete": "Action effectuée", "actionfailed": "L'action a échoué", diff --git a/languages/i18n/fy.json b/languages/i18n/fy.json index c4bf7928f0..d1d9de92b1 100644 --- a/languages/i18n/fy.json +++ b/languages/i18n/fy.json @@ -277,13 +277,13 @@ "nstab-special": "Bysûndere side", "nstab-project": "Projektside", "nstab-image": "Bestân", - "nstab-mediawiki": "Berjocht", + "nstab-mediawiki": "Systeemberjocht", "nstab-template": "Berjocht", "nstab-help": "Helpside", "nstab-category": "Kategory", "mainpage-nstab": "Haadside", "nosuchaction": "Unbekende aksje.", - "nosuchactiontext": "De opdracht yn de URL is ûnjildich.\nMooglik hasto in typefout makke yn de URL of in ferkearde keppeling folge.\nIt soe likegoed in programmatuerflater fan {{SITENAME}} wêze kinne.", + "nosuchactiontext": "De opdracht yn de URL is ûnjildich.\nMooglik hawwe jo in typflater yn 'e URL makke of in ferkearde keppeling folge.\nIt soe likegoed in programmatuerflater fan {{SITENAME}} wêze kinne.", "nosuchspecialpage": "Gjin soksoarte bysûndere side", "nospecialpagetext": "Jo hawwe in ûnjildige bysûndere side opfrege.\n\nIn list fan jildige bysûndere siden stiet op [[Special:SpecialPages|{{int:specialpages}}]].", "error": "Flater", @@ -385,7 +385,7 @@ "noname": "Jo hawwe gjin jildige meidochnamme opjûn.", "loginsuccesstitle": "Oanmelden slagge.", "loginsuccess": "Jo binne no oanmeld op {{SITENAME}} as \"$1\".", - "nosuchuser": "Der is gjin meidogger \"$1\".\nKontrolearje de stavering, of [[Special:CreateAccount|meitsje in nije meidogger oan]].", + "nosuchuser": "Der is gjin meidogger mei de namme \"$1\".\nMeidochnammen binne haadlettergefoelich.\nSjoch de stavering nei, of [[Special:CreateAccount|meitsje in nij akkount oan]].", "nosuchusershort": "Der is gjin meidogger mei de namme \"$1\". It is goed skreaun?", "nouserspecified": "Jo moatte in meidochnamme opjaan.", "wrongpassword": "Ferkearde meidochnamme of wachtwurd ynfolle.\nBesykje it nochris.", @@ -460,7 +460,7 @@ "headline_sample": "Koptekst", "headline_tip": "Underkopke", "nowiki_sample": "Foechje hjir platte tekst yn", - "nowiki_tip": "Negearje it wiki formaat", + "nowiki_tip": "Wiki-opmaak negearje", "image_sample": "Foarbyld.jpg", "image_tip": "Mediabestân", "media_tip": "Link nei bestân", @@ -1625,8 +1625,8 @@ "tooltip-ca-nstab-special": "Dit is in bysûndere side, en kin net bewurke wurde", "tooltip-ca-nstab-project": "Projektside sjen litte", "tooltip-ca-nstab-image": "De bestânsside sjen litte", - "tooltip-ca-nstab-mediawiki": "Systeemberjocht sjen litte", - "tooltip-ca-nstab-template": "Sjabloan sjen litte", + "tooltip-ca-nstab-mediawiki": "It systeemberjocht sjen litte", + "tooltip-ca-nstab-template": "It berjocht sjen litte", "tooltip-ca-nstab-help": "Helpside sjen litte", "tooltip-ca-nstab-category": "Kategory-side sjen litte", "tooltip-minoredit": "Markearje dizze feroaring as fan lytse betsjutting", diff --git a/languages/i18n/hy.json b/languages/i18n/hy.json index fb8899face..4c10d9c202 100644 --- a/languages/i18n/hy.json +++ b/languages/i18n/hy.json @@ -253,7 +253,7 @@ "mainpage": "Գլխավոր էջ", "mainpage-description": "Գլխավոր էջ", "policy-url": "Project:Կանոնակարգ", - "portal": "Խորհրդարան", + "portal": "Համայնքային պորտալ", "portal-url": "Project:Համայնքային պորտալ", "privacy": "Գաղտնիության քաղաքականություն", "privacypage": "Project:Գաղտնիության քաղաքականություն", diff --git a/languages/i18n/hyw.json b/languages/i18n/hyw.json index 798836790e..b0fb6344a5 100644 --- a/languages/i18n/hyw.json +++ b/languages/i18n/hyw.json @@ -792,6 +792,7 @@ "logentry-newusers-autocreate": "$1 մասնակցային հաշիւը {{GENDER:$2|ստեղծուած է}} ինքնաբերաբար", "logentry-upload-upload": "$1 {{GENDER:$2|ներբեռնուած է}} $3", "logentry-upload-overwrite": "$1 {{GENDER:$2|վերբեռնեց}} $3ի նոր տարբերակ", + "feedback-cancel": "Չեղարկել", "searchsuggest-search": "Որոնել {{SITENAME}} կայքին մէջ", "duration-days": "$1 {{PLURAL:$1|օր}}", "randomrootpage": "Պատահական արմատ էջ" diff --git a/languages/i18n/it.json b/languages/i18n/it.json index 54c57885e2..50b944108a 100644 --- a/languages/i18n/it.json +++ b/languages/i18n/it.json @@ -2305,7 +2305,7 @@ "delete-confirm": "Cancella \"$1\"", "delete-legend": "Cancella", "historywarning": "'''Attenzione:''' La pagina che stai per cancellare ha una cronologia con $1 {{PLURAL:$1|versione|versioni}}:", - "historyaction-submit": "Mostra", + "historyaction-submit": "Mostra versioni", "confirmdeletetext": "Stai per cancellare una pagina con tutta la sua cronologia. Per cortesia, conferma che è tua intenzione procedere a tale cancellazione, che hai piena consapevolezza delle conseguenze della tua azione e che essa è conforme alle linee guida stabilite in [[{{MediaWiki:Policy-url}}]].", "actioncomplete": "Azione completata", "actionfailed": "Azione fallita", diff --git a/languages/i18n/lb.json b/languages/i18n/lb.json index f3425cadd3..d4b3e7ff6c 100644 --- a/languages/i18n/lb.json +++ b/languages/i18n/lb.json @@ -2087,7 +2087,7 @@ "delete-confirm": "Läsche vu(n) \"$1\"", "delete-legend": "Läschen", "historywarning": "Opgepasst: D'Säit déi Dir läsche wëllt huet en Historique mat $1 {{PLURAL:$1|Versioun|Versiounen}}:", - "historyaction-submit": "Weisen", + "historyaction-submit": "Versioune weisen", "confirmdeletetext": "Dir sidd am Gaang, eng Säit mat hirem kompletten Historique vollstänneg aus der Datebank ze läschen.\nW.e.g. confirméiert, datt Dir dëst wierklech wëllt, datt Dir d'Konsequenze verstitt, an datt dat Ganzt am Aklang mat de [[{{MediaWiki:Policy-url}}|Richtlinne]] geschitt.", "actioncomplete": "Aktioun ofgeschloss", "actionfailed": "Aktioun huet net funktionéiert", @@ -2107,6 +2107,7 @@ "deleting-backlinks-warning": "Opgepasst: [[Special:WhatLinksHere/{{FULLPAGENAME}}|Aner Säite]] linken op déi Säit déi Dir am Gaang sidd ze läschen oder déi Säit Déi Dir am Gaang sidd ze läschen ass an aner Säiten agebonn.", "deleting-subpages-warning": "Opgepasst: D'Säit, déi Dir läsche wëllt, huet [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|eng Ënnersäit|$1 Ënnersäiten|51=méi wéi 50 Ënnersäiten}}]].", "rollback": "Ännerungen zrécksetzen", + "rollback-confirmation-confirm": "W.e.g. Konfirméieren", "rollback-confirmation-yes": "Zrécksetzen", "rollback-confirmation-no": "Ofbriechen", "rollbacklink": "Zrécksetzen", diff --git a/languages/i18n/lrc.json b/languages/i18n/lrc.json index 7458dea35a..7679db6948 100644 --- a/languages/i18n/lrc.json +++ b/languages/i18n/lrc.json @@ -76,12 +76,12 @@ "thu": "پٱن شٱمٱ", "fri": "جۏمٱ", "sat": "شٱمٱ", - "january": "جانڤیٱ", + "january": "ژانڤیٱ", "february": "فڤریٱ", "march": "مارس", "april": "آڤریل", "may_long": "ماٛی", - "june": "جوئٱن", + "june": "ژوئٱن", "july": "جۊلای", "august": "آگوست", "september": "سپتامر", @@ -100,12 +100,12 @@ "october-gen": "اوکتوبر", "november-gen": "نوڤامر", "december-gen": "دسامر", - "jan": "جانڤیٱ", + "jan": "ژانڤیٱ", "feb": "فڤریٱ", "mar": "مارس", "apr": "آڤریل", "may": "ماٛی", - "jun": "جوئٱن", + "jun": "ژوئٱن", "jul": "جۊلای", "aug": "آگوست", "sep": "سپتامر", @@ -169,7 +169,7 @@ "history": "ڤیرگار بٱلگٱ", "history_short": "ڤیرگار", "updatedmarker": "د آخئری دییئن مئنە ڤئ هنگوم کو", - "printableversion": "نۏسخٱ پلا بینی", + "printableversion": "نۏسخٱ پلا بیئنی", "permalink": "هوم پاٛڤٱن هٱمیشاٛیی", "print": "چاپ گئرئتئن", "view": "دیئن", @@ -214,8 +214,8 @@ "pool-errorunknown": "خأطا نادیار", "pool-servererror": "پوٙل ئشمار خئذمأتگە د دأسرئس نی($1).", "poolcounter-usage-error": "خأطا ڤئ کار گئرئتئن:$1", - "aboutsite": "دبارٱ {{SITENAME}}", - "aboutpage": "Project:دبارٱ", + "aboutsite": "دٱربارٱ {{SITENAME}}", + "aboutpage": "Project:دٱربارٱ", "copyright": "مینۊنٱیا هان د دٱسرس $1 مٱر یٱ کاٛ ڤ یاٛ گاٛل شیڤاٛ هٱنی نیسٱنٱ بۊٱ.", "copyrightpage": "{{ns:project}}:کوپی رایت", "currentevents": "روخ ڤنؽا ایسنی", @@ -2249,13 +2249,13 @@ "tooltip-ca-watch": "اْزاف کردن اؽ بٱلگٱ ڤ نوم نڤشت پاٛگیریاتو", "tooltip-ca-unwatch": "ڤرداشتن اؽ بٱلگٱ ڤ نوم نڤشت پاٛگیریاتو", "tooltip-search": "پاٛ جۊری {{SITENAME}}", - "tooltip-search-go": "رۉ د بٱلگاٛیؽ کاْ یٱ نوم روسی ها مؽنش ٱلڤٱت ٱر دش بۊئٱ", + "tooltip-search-go": "رۉ د بٱلگاٛیؽ کاْ یٱ نوم راسی ها مؽنش ٱلڤٱت ٱر دش بۊئٱ", "tooltip-search-fulltext": "بٱلگٱیاناْ سی چنی نیسساٛیؽ پاٛ جۊری بٱکو.", "tooltip-p-logo": "ساٛلٛ سرآسونٱ بٱکؽت", "tooltip-n-mainpage": "سرآسونٱ ناْ ساٛلٛ بٱکؽت", "tooltip-n-mainpage-description": "سرآسونٱ ناْ ساٛلٛ بٱکؽت", "tooltip-n-portal": "دبارٱ پرۉژٱ؛ شما مؽ تونؽت چؽ بٱکؽت؛ د کوجا اؽ چیاناْ بٱجۊرؽت.", - "tooltip-n-currentevents": "ساڤند دونسمنیایؽ کا هان د روخ ڤنؽا تازٱ باڤ دؽاری بٱک", + "tooltip-n-currentevents": "ساڤن دونسمنیایؽ کا هان د روخ ڤٱنؽا تازٱ بۊ دؽاری بٱک", "tooltip-n-recentchanges": "یاٛ نومگٱ سی آلشتکاریا د ڤیکی", "tooltip-n-randompage": "سڤار کرد بٱلگٱ بٱختٱکی", "tooltip-n-help": "یاٛ جاگٱ سی فٱمسن", diff --git a/languages/i18n/lt.json b/languages/i18n/lt.json index 4daa9bad4f..72d86c1cf4 100644 --- a/languages/i18n/lt.json +++ b/languages/i18n/lt.json @@ -2319,6 +2319,7 @@ "mycontris": "Indėlis", "anoncontribs": "Indėlis", "contribsub2": "Naudotojas: {{GENDER:$3|$1}} ($2)", + "contributions-subtitle": "{{GENDER:$3|$1}}", "contributions-userdoesnotexist": "Naudotojo paskyra „$1“ neužregistruota.", "nocontribs": "Jokie keitimai neatitiko šių kriterijų.", "uctop": "dabartinis", diff --git a/languages/i18n/mk.json b/languages/i18n/mk.json index bbf8090222..c7ce646d5a 100644 --- a/languages/i18n/mk.json +++ b/languages/i18n/mk.json @@ -505,7 +505,7 @@ "accountcreatedtext": "Корисничката сметка за [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|разговор]]) е направена.", "createaccount-title": "Создавање на сметка за {{SITENAME}}", "createaccount-text": "Некој направил сметка со вашата е-поштенска адреса на {{SITENAME}} ($4) со име „$2“ и лозинка „$3“.\nБи требало сега да се пријавите и да ја промените вашата лозинка.\n\nМожете да ја занемарите оваа порака ако сметката била направена по грешка.", - "login-throttled": "Имате премногу обиди за најава за кратко време.\nПочекајте $1 пред да се обидете повторно.", + "login-throttled": "Направивте премногу обиди за најава.\nПочекајте $1 пред да се обидете повторно.", "login-abort-generic": "Најавата е неуспешна — Откажано", "login-migrated-generic": "Вашата сметка е пренесена и корисничкото име веќе не постои на ова вики.", "loginlanguagelabel": "Јазик: $1", @@ -1397,7 +1397,7 @@ "rcfilters-restore-default-filters": "Поврати основни филтри", "rcfilters-clear-all-filters": "Тргни ги сите филтри", "rcfilters-show-new-changes": "Погл. најнови промени", - "rcfilters-search-placeholder": "Филтрирање на промени (со менито или пребарајте назив на филтер)", + "rcfilters-search-placeholder": "Филтрирање на промени (користете го менито или пребарајте назив на филтер)", "rcfilters-invalid-filter": "Неважечки филтер", "rcfilters-empty-filter": "Нема активни филтри. Прикажани се сите придонеси.", "rcfilters-filterlist-title": "Филтри", @@ -2253,7 +2253,7 @@ "delete-confirm": "Бришење на „$1“", "delete-legend": "Бришење", "historywarning": "Предупредување: Страницата што сакате да ја избришете има историја со {{PLURAL:$1|една преработка|$1 преработки}}:", - "historyaction-submit": "Прикажи", + "historyaction-submit": "Прикажи преработки", "confirmdeletetext": "На пат сте трајно да избришете страница заедно со нејзината историја.\nПотврдете дека имате намера да го направите ова, дека ги разбирате последиците од тоа и дека го правите во согласност со [[{{MediaWiki:Policy-url}}|правилата]].", "actioncomplete": "Дејството е извршено", "actionfailed": "Неуспешно дејство", @@ -3611,7 +3611,7 @@ "duration-hours": "{{PLURAL:$1|еден час|$1 часа}}", "duration-days": "{{PLURAL:$1|еден ден|$1 дена}}", "duration-weeks": "$1 {{PLURAL:$1|недела|недели}}", - "duration-years": "{{PLURAL:$1|$1 година|$1 години}}", + "duration-years": "$1 {{PLURAL:$1|година|години}}", "duration-decades": "$1 {{PLURAL:$1|деценија|децении}}", "duration-centuries": "$1 {{PLURAL:$1|век|века}}", "duration-millennia": "$1 {{PLURAL:$1|милениум|милениуми}}", diff --git a/languages/i18n/nl.json b/languages/i18n/nl.json index dfaf649cd8..489fba65df 100644 --- a/languages/i18n/nl.json +++ b/languages/i18n/nl.json @@ -749,7 +749,7 @@ "userpage-userdoesnotexist": "Gebruikersaccount \"$1\" bestaat niet.\nControleer of u deze pagina wel wilt aanmaken/bewerken.", "userpage-userdoesnotexist-view": "Gebruikersaccount \"$1\" bestaat niet.", "blocked-notice-logextract": "Deze gebruiker is momenteel geblokkeerd.\nDe laatste regel uit het blokkeerlogboek wordt hieronder ter referentie weergegeven:", - "clearyourcache": "Opmerking: nadat u de wijzigingen hebt opgeslagen is het wellicht nodig uw browsercache te legen.\n* Firefox / Safari: houd Shift ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)\n* Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)\n* Internet Explorer: houd Ctrl ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5\n* '''Opera:''' ga naar Menu → Instellingen (Opera → Voorkeuren op een Mac) en daarna naar Privacy & beveiliging → Browsegegevens wissen... → Tijdelijk opgeslgen afbeeldingen en bestanden.", + "clearyourcache": "Opmerking: nadat u de wijzigingen hebt opgeslagen is het wellicht nodig uw browsercache te legen.\n* Firefox / Safari: houd Shift ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)\n* Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)\n* Internet Explorer: houd Ctrl ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5\n* '''Opera:''' ga naar Menu → Instellingen (Opera → Voorkeuren op een Mac) en daarna naar Privacy & beveiliging → Browsegegevens wissen... → Tijdelijk opgeslagen afbeeldingen en bestanden.", "usercssyoucanpreview": "'''Tip:''' gebruik de knop \"{{int:showpreview}}\" om uw nieuwe CSS te testen alvorens op te slaan.", "userjsonyoucanpreview": "'''Tip:''' gebruik de knop \"{{int:showpreview}}\" om uw nieuwe JSON te testen alvorens op te slaan.", "userjsyoucanpreview": "'''Tip:''' gebruik de knop \"{{int:showpreview}}\" om uw nieuwe JavaScript te testen alvorens op te slaan.", @@ -2314,7 +2314,7 @@ "delete-confirm": "\"$1\" verwijderen", "delete-legend": "Verwijderen", "historywarning": "Waarschuwing: de pagina die u wilt verwijderen heeft ongeveer $1 {{PLURAL:$1|versie|versies}}:", - "historyaction-submit": "Weergeven", + "historyaction-submit": "Versies weergeven", "confirmdeletetext": "U staat op het punt een pagina te verwijderen, inclusief de geschiedenis.\nBevestig hieronder dat dit inderdaad uw bedoeling is, dat u de gevolgen begrijpt en dat de verwijdering overeenstemt met het [[{{MediaWiki:Policy-url}}|beleid]].", "actioncomplete": "Handeling voltooid", "actionfailed": "Handeling mislukt", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index a658900b84..72a44136da 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1054,7 +1054,7 @@ "page_first": "This is part of the navigation message on the top and bottom of Special pages which are lists of things in alphabetical order, e.g. the '[[Special:Categories|Categories]]' special page. It is followed by the message {{msg-mw|Viewprevnext}}.\n{{Identical|First}}", "page_last": "This is part of the navigation message on the top and bottom of Special pages which are lists of things in alphabetical order, e.g. the '[[Special:Categories|Categories]]' special page. It is followed by the message {{msg-mw|Viewprevnext}}.\n\n{{Identical|Last}}", "histlegend": "Text in history page.\n\nSee also:\n* {{msg-mw|Cur}}\n* {{msg-mw|Last}}\n* {{msg-mw|Minoreditletter}}", - "history-fieldset-title": "Fieldset label in the edit history pages.", + "history-fieldset-title": "Form legend label in the edit history page.", "history-show-deleted": "CheckBox to show only per [[mw:Manual:RevisionDelete|RevisionDelete]] deleted versions.\n\nUsed in History and [[Special:Contributions]].", "history_copyright": "{{notranslate}}", "histfirst": "This is part of the navigation message on the top and bottom of Page History pages which are lists of things in date order, e.g. [{{canonicalurl:Support|action=history}} Page History of Support].\n\nIt is followed by the message {{msg-mw|Viewprevnext}}.\n{{Identical|Oldest}}", diff --git a/resources/lib/foreign-resources.yaml b/resources/lib/foreign-resources.yaml index 651acc81a0..dc7379ad44 100644 --- a/resources/lib/foreign-resources.yaml +++ b/resources/lib/foreign-resources.yaml @@ -192,11 +192,11 @@ mustache: type: multi-file files: mustache.js: - src: https://raw.githubusercontent.com/janl/mustache.js/v1.0.0/mustache.js - integrity: sha384-k2UYqmzoiq/qgIzZvcYBxbXQW4YdPAsXDOTkHTGb9TCZ9sjCkyT4TlaUN0wQRkql + src: https://raw.githubusercontent.com/janl/mustache.js/v3.0.1/mustache.js + integrity: sha384-YjAj6Nll7fkEWzxTlE9o3NWC9qdZt1Upat6Afjib9eLs8lTODpSKEBHeXq8o/VUH LICENSE: - src: https://raw.githubusercontent.com/janl/mustache.js/v1.0.0/LICENSE - integrity: sha384-MYVwXwula9+YkyXexOJVZ0v0DaVvG22uX57mNq5Di+7u8OH9EG9q3yuXkp1Iehiq + src: https://raw.githubusercontent.com/janl/mustache.js/v3.0.1/LICENSE + integrity: sha384-j2EDj6YtCRgFvYDtzo6pXzbskIj/K1Yg65BL0j3/L6UIHxbMtRMJwC/W+XoYx0FZ oojs: type: tar diff --git a/resources/lib/mustache/LICENSE b/resources/lib/mustache/LICENSE index aa1b831603..4df7d1aae6 100644 --- a/resources/lib/mustache/LICENSE +++ b/resources/lib/mustache/LICENSE @@ -2,6 +2,7 @@ The MIT License Copyright (c) 2009 Chris Wanstrath (Ruby) Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/resources/lib/mustache/mustache.js b/resources/lib/mustache/mustache.js index c7ffbef007..8ec1b44cca 100644 --- a/resources/lib/mustache/mustache.js +++ b/resources/lib/mustache/mustache.js @@ -3,54 +3,86 @@ * http://github.com/janl/mustache.js */ -/*global define: false*/ +/*global define: false Mustache: true*/ -(function (global, factory) { - if (typeof exports === "object" && exports) { +(function defineMustache (global, factory) { + if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') { factory(exports); // CommonJS - } else if (typeof define === "function" && define.amd) { + } else if (typeof define === 'function' && define.amd) { define(['exports'], factory); // AMD } else { - factory(global.Mustache = {}); //